diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2022-01-03 14:15:49 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2022-01-04 14:39:14 +0100 |
commit | f64fd5abf2a9cd7dd2cba9a57a4c8013cd634472 (patch) | |
tree | 8e6f471e80e7ae69be1038ace29d9d35b0cd479f /vcl | |
parent | 7025e57c8f1e26f40754dd0aeb07aa7096a90e1f (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
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127898
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 8b2e145d0aae..811371b2396f 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -338,9 +338,9 @@ void Window::EndTracking( TrackingEventFlags nFlags ) bool Window::IsTracking() const { - return (mpWindowImpl->mbUseFrameData ? - mpWindowImpl->mpFrameData->mpTrackWin == this : - ImplGetSVData()->mpWinData->mpTrackWin == this); + return mpWindowImpl && (mpWindowImpl->mbUseFrameData ? + mpWindowImpl->mpFrameData->mpTrackWin == this : + ImplGetSVData()->mpWinData->mpTrackWin == this); } void Window::StartAutoScroll( StartAutoScrollFlags nFlags ) |