[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 2 commits - vcl/source

Michael Meeks michael.meeks at collabora.com
Sat Apr 25 04:10:58 PDT 2015


 vcl/source/control/combobox.cxx |    3 +++
 vcl/source/window/window.cxx    |    8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 0cde74f788a054fa2b65107a030dd463b8d11c7a
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sat Apr 25 12:16:28 2015 +0100

    Make Window's inDispose map more precisely to mbInDtor.
    
    Change-Id: I545aa03d46b0673aafe73daa23047d2a4b6936dd

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index cb457e4..a280209 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -139,9 +139,8 @@ bool Window::IsDisposed() const
 
 void Window::dispose()
 {
-    mpWindowImpl->mbInDispose = true;
-
-    assert( mpWindowImpl && mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
+    assert( mpWindowImpl );
+    assert( !mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
     assert( !mpWindowImpl->mpParent ||
             !mpWindowImpl->mpParent->IsDisposed() ||
             "vcl::Window child should have its parent disposed first" );
@@ -159,6 +158,8 @@ void Window::dispose()
             xCanvasComponent->dispose();
     }
 
+    mpWindowImpl->mbInDispose = true;
+
     CallEventListeners( VCLEVENT_OBJECT_DYING );
 
     // do not send child events for frames that were registered as native frames
@@ -576,6 +577,7 @@ void Window::dispose()
 
 Window::~Window()
 {
+    // FIXME: we should kill all LazyDeletor usage.
     vcl::LazyDeletor<vcl::Window>::Undelete( this );
     disposeOnce();
 }
commit ca7c519c6e95890deb047ea6137303b8ec55c491
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sat Apr 25 12:15:43 2015 +0100

    Make combobox tolerate post-dispose usage better.
    
    Change-Id: I5d7127bfc639591862cea91f0597ef050112b43b

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 94b8f3cfa..4606325 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -804,6 +804,9 @@ void ComboBox::Modify()
 
 void ComboBox::ImplUpdateFloatSelection()
 {
+    if (!mpImplLB)
+        return;
+
     // move text in the ListBox into the visible region
     mpImplLB->SetCallSelectionChangedHdl( false );
     if ( !IsMultiSelectionEnabled() )


More information about the Libreoffice-commits mailing list