summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-22 12:22:20 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-23 15:16:54 +0000
commit7bc9b583ab8d80fe3e03c0715f63e0421a802c5c (patch)
treecfba2c6c173c1fa95030040944642f0ede2808d9
parent0effc85942dcfc1b2f96a5671e0acc8f05d47db3 (diff)
Resolves: tdf#100303 Report crashes on close of conditional formatting dialog
Condition multiply inherits so the Builder::disposeBuilder call was missed and prenotify occurs during ::dispose when there is no m_pConditionPlayground anymore, so m_pConditionPlayground == 0 where pPlaygroundCandidate is 0 passes, so a random widget gets cast to somethings its not, hence the bad cast exception Change-Id: I6d081dd55df1a68ab893294858e1ab0054d5e049 (cherry picked from commit 547e4b3a80708600edbc3f5669b4428877b5a951) Reviewed-on: https://gerrit.libreoffice.org/26568 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx5
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx1
2 files changed, 5 insertions, 1 deletions
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 910f4a0aded0..c48f4622419c 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -500,7 +500,10 @@ namespace rptui
}
case MouseNotifyEvent::GETFOCUS:
{
- if ( m_bDeletingCondition )
+ if (m_bDeletingCondition)
+ break;
+
+ if (!m_pConditionPlayground) //e.g. during dispose
break;
const vcl::Window* pGetFocusWindow( _rNEvt.GetWindow() );
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 142be8abb782..36cf30541c67 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -329,6 +329,7 @@ void Condition::dispose()
m_pAddCondition.clear();
m_pRemoveCondition.clear();
m_pColorFloat.disposeAndClear();
+ disposeBuilder();
VclHBox::dispose();
}