vcl/source/window/window2.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit d4c99f07ed4a795519797f56be29c24a242f4db2 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Thu Feb 2 00:08:41 2023 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Feb 4 06:18:30 2023 +0000 vcl: fix online crash in vcl::Window::IsTracking() Crashreport signature: program/libmergedlo.so vcl::Window::IsTracking() const vcl/source/window/window2.cxx:340 program/libmergedlo.so (anonymous namespace)::LOKPostAsyncEvent(void*, void*) sfx2/source/view/lokhelper.cxx:812 program/libmergedlo.so LokChartHelper::postMouseEvent(int, int, int, int, int, int, double, double) include/rtl/ref.hxx:128 program/libmergedlo.so SfxLokHelper::testInPlaceComponentMouseEventHit(SfxViewShell*, int, int, int, int, int, int, double, double, bool) sfx2/source/view/lokhelper.cxx:980 /program/libswlo.so SwXTextDocument::postMouseEvent(int, int, int, int, int, int) sw/source/uibase/uno/unotxdoc.cxx:3663 program/libmergedlo.so doc_postMouseEvent desktop/source/lib/init.cxx:4831 Change-Id: Iab7d24a901e57dc8af3fb2c77fbea3b4fdad9fb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146483 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146549 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 87db8e470e21..180edf5cf961 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -341,9 +341,15 @@ bool Window::IsTracking() const { if (!mpWindowImpl) return false; - return (mpWindowImpl->mbUseFrameData ? - mpWindowImpl->mpFrameData->mpTrackWin == this : - ImplGetSVData()->mpWinData->mpTrackWin == this); + if (mpWindowImpl->mbUseFrameData && mpWindowImpl->mpFrameData) + { + return mpWindowImpl->mpFrameData->mpTrackWin == this; + } + if (!mpWindowImpl->mbUseFrameData && ImplGetSVData()->mpWinData) + { + return ImplGetSVData()->mpWinData->mpTrackWin == this; + } + return false; } void Window::StartAutoScroll( StartAutoScrollFlags nFlags ) commit cb44dab0784476a2be0708e801696f47486aa3a2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 27 08:50:04 2023 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Feb 4 06:18:21 2023 +0000 fix online crash in WIndow::IsTracking /opt/collaboraoffice/program/libmergedlo.so vcl::Window::IsTracking() const /home/collabora/jenkins/workspace/build_core_co-22.05_for_online_snapshot/vcl/source/window/window2.cxx:340 /opt/collaboraoffice/program/libmergedlo.so (anonymous namespace)::LOKPostAsyncEvent(void*, void*) /home/collabora/jenkins/workspace/build_core_co-22.05_for_online_snapshot/sfx2/source/view/lokhelper.cxx:812 /opt/collaboraoffice/program/libmergedlo.so LokChartHelper::postMouseEvent(int, int, int, int, int, int, double, double) /home/collabora/jenkins/workspace/build_core_co-22.05_for_online_snapshot/include/rtl/ref.hxx:128 Change-Id: I204bac7d8f595054abe9b6e8e631c02b26e20361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146231 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146548 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 978dc0b6ecf8..87db8e470e21 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -339,6 +339,8 @@ void Window::EndTracking( TrackingEventFlags nFlags ) bool Window::IsTracking() const { + if (!mpWindowImpl) + return false; return (mpWindowImpl->mbUseFrameData ? mpWindowImpl->mpFrameData->mpTrackWin == this : ImplGetSVData()->mpWinData->mpTrackWin == this);