lokit: double check for disposed windows & fix leak.
commite1e62ba8bb09c532db576abcca451238bc86ffef
authorMichael Meeks <michael.meeks@collabora.com>
Mon, 3 Jan 2022 14:15:49 +0000 (3 14:15 +0000)
committerCaolán McNamara <caolanm@redhat.com>
Sun, 27 Feb 2022 21:25:44 +0000 (27 22:25 +0100)
tree20c4719f7af347439759d1cd2ed47577ba3c2764
parent321325452c16e5e0f9e5258bb2ccdbfff63acc12
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/+/127907
(cherry picked from commit 7ba99b8d6da07c2133c644de4d1a3613a9fa5a68)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129839
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
sfx2/source/view/lokhelper.cxx
vcl/source/window/window2.cxx