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

Pranav Kant pranavk at collabora.co.uk
Fri Mar 23 12:35:43 UTC 2018


 include/vcl/ITiledRenderable.hxx  |    3 +++
 sw/source/uibase/uno/unotxdoc.cxx |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit ed4df95f28d4081c8d244dc013fda53cee5f91b7
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Fri Mar 23 16:24:24 2018 +0530

    lok: don't post events on disposed window
    
    Change-Id: I7721380b1bb6e9ec21338a72523326d0cae6729e
    Reviewed-on: https://gerrit.libreoffice.org/51777
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: pranavk <pranavk at collabora.co.uk>

diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index b95ac6386829..e25cdd67506a 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -101,6 +101,9 @@ public:
     static void LOKPostAsyncEvent(void* pEv, void*)
     {
         LOKAsyncEventData* pLOKEv = static_cast<LOKAsyncEventData*>(pEv);
+        if (pLOKEv->mpWindow->IsDisposed())
+            return;
+
         switch (pLOKEv->mnEvent)
         {
         case VclEventId::WindowKeyInput:
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 4c442911c6eb..614050ba732f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3487,7 +3487,7 @@ void SwXTextDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
     SolarMutexGuard aGuard;
 
     VclPtr<vcl::Window> pWindow = getDocWindow();
-    if (!pWindow)
+    if (!pWindow || pWindow->IsDisposed())
         return;
 
     LOKAsyncEventData* pLOKEv = new LOKAsyncEventData;


More information about the Libreoffice-commits mailing list