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

Michael Meeks michael.meeks at collabora.com
Wed Mar 16 17:18:17 UTC 2016


 vcl/source/window/dndeventdispatcher.cxx |    2 +-
 vcl/source/window/window2.cxx            |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 652e8a2b37bded8afe73f8ee03bb6664443c7cab
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Mar 16 16:02:46 2016 +0000

    tdf#98607 - fix drag and drop regression.
    
        regressed in: f2f1f52d8b84ac088496a4964d799bb84007fc45
        Added belt and braces fix.
        Thanks to Maxim for the bisect.
    
    Change-Id: I5b263870d76f44ef8833b27f0d8d391210216459
    Reviewed-on: https://gerrit.libreoffice.org/23307
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/source/window/dndeventdispatcher.cxx b/vcl/source/window/dndeventdispatcher.cxx
index 9ca0a92..1fcf74d 100644
--- a/vcl/source/window/dndeventdispatcher.cxx
+++ b/vcl/source/window/dndeventdispatcher.cxx
@@ -397,7 +397,7 @@ sal_Int32 DNDEventDispatcher::fireDropEvent( vcl::Window *pWindow,
                 xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions, xTransferable );
         }
 
-        if ( xWindow->IsDisposed() )
+        if ( !xWindow->IsDisposed() )
         {
             // release UI lock
             pWindow->DecrementLockCount();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 4c42447..3f6355e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1024,12 +1024,15 @@ void Window::SetCompoundControl( bool bCompound )
 
 void Window::IncrementLockCount()
 {
+    assert( mpWindowImpl != NULL );
     mpWindowImpl->mnLockCount++;
 }
 
 void Window::DecrementLockCount()
 {
-    mpWindowImpl->mnLockCount--;
+    assert( mpWindowImpl != NULL );
+    if (mpWindowImpl)
+        mpWindowImpl->mnLockCount--;
 }
 
 WinBits Window::GetStyle() const


More information about the Libreoffice-commits mailing list