diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-22 12:22:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-28 11:05:25 +0000 |
commit | 7cb1840b41fcb1cf0ec60a0ceecfd1cbf6e44ae7 (patch) | |
tree | 0b8dead8d995c6d510ee88c60c01ea91da57df82 | |
parent | bc34f5bae1ffc42fb848b2341020fc3fa52afbe2 (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/26569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | reportdesign/source/ui/dlg/CondFormat.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index 175a74083f40..835180600434 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 d5477f11442c..43c8b7b34459 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(); } |