diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-21 16:14:45 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-22 01:17:42 +0100 |
commit | 3ca642e58251ffbb8fc30f85ae29cc75d97e4802 (patch) | |
tree | d9595ed0605784602dbb289a16f837ebf090153b /sc | |
parent | ea92fb2b82a050c24a72c55a484163b07263ab4c (diff) |
Make sure one base class does not use another one after destruction
The original code lead to invoking a pure virtual function in Calc when
doing Ctrl-F2, ESC.
Signed-off-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/formula.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx index 306aaa565d8d..1a62e6d919fb 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -62,9 +62,12 @@ class SvLBoxEntry; typedef ScTabViewShell* PtrTabViewShell; //============================================================================ -class ScFormulaDlg : public formula::FormulaDlg, - public IAnyRefDialog, - public formula::IFormulaEditorHelper +// Order of base classes is important, as pointer to IFormulaEditorHelper base +// is passed into constructor of FormulaDlg base, which expects the former to +// outlive itself: +class ScFormulaDlg : public formula::IFormulaEditorHelper, + public formula::FormulaDlg, + public IAnyRefDialog { ScFormulaReferenceHelper m_aHelper; ScFormulaCell* pCell; |