[Libreoffice-commits] core.git: reportdesign/source

Caolán McNamara caolanm at redhat.com
Wed Jun 22 11:24:53 UTC 2016


 reportdesign/source/ui/dlg/CondFormat.cxx |    5 ++++-
 reportdesign/source/ui/dlg/Condition.cxx  |    1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 547e4b3a80708600edbc3f5669b4428877b5a951
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 22 12:22:20 2016 +0100

    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

diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 910f4a0..c48f462 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 142be8a..36cf305 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();
 }
 


More information about the Libreoffice-commits mailing list