summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2022-01-03 14:15:49 +0000
committerMichael Meeks <michael.meeks@collabora.com>2022-01-04 17:08:27 +0100
commit2ac23d25f0670c3274603deb88aef352def635a1 (patch)
treeb3a33cadd469ab6c49e176ad30fc24f2373946da /vcl
parentd489e2a674ac79555bc81c0ebad09ae8e51013d8 (diff)
lokit: double check for disposed windows & fix leak.
it seems we can get windows disposed before we get to the emission. <segv> vcl::Window::IsTracking() const vcl/source/window/window2.cxx:341 (anonymous namespace)::LOKPostAsyncEvent(void*, void*) sfx2/source/view/lokhelper.cxx:725 LokChartHelper::postMouseEvent(int, int, int, int, int, int, double, double) include/rtl/ref.hxx:112 SwXTextDocument::postMouseEvent(int, int, int, int, int, int) sw/source/uibase/uno/unotxdoc.cxx:3561 Change-Id: I93aea931dad1e7f43d3d610568424c53d2b22fbc Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127939
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/window2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 88bf838cf846..8282396af932 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -312,7 +312,7 @@ void Window::EndTracking( TrackingEventFlags nFlags )
bool Window::IsTracking() const
{
- return (ImplGetSVData()->mpWinData->mpTrackWin == this);
+ return mpWindowImpl && (ImplGetSVData()->mpWinData->mpTrackWin == this);
}
void Window::StartAutoScroll( StartAutoScrollFlags nFlags )