summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/ITiledRenderable.hxx3
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 95775be55913..aa5e0c113e6f 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 VCLEVENT_WINDOW_KEYINPUT:
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index e8dbe796ca5b..f578c5480bb4 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3492,7 +3492,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;