vcl/source/window/window2.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 455a1775ccef305cfb96cc5f67c8ee47b7f3a2ae
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Oct 26 12:18:37 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Oct 26 15:52:33 2023 +0200

    crash seen in Window::ImplTrackTimerHdl
    
     #0  vcl::Window::ImplTrackTimerHdl (this=0x3403b0a0, pTimer=<optimized 
out>) at libreoffice/vcl/source/window/window2.cxx:231
     #1  0x00007f2bdd31f5e7 in Scheduler::CallbackTaskScheduling () at 
libreoffice/vcl/source/app/scheduler.cxx:485
     #2  0x00007f2bdd4e5176 in SalTimer::CallCallback (this=<optimized out>) at 
libreoffice/vcl/inc/saltimer.hxx:54
     #3  SvpSalInstance::CheckTimeout (this=this@entry=0x261ef40, 
bExecuteTimers=bExecuteTimers@entry=true)
         at libreoffice/vcl/headless/svpinst.cxx:212
     #4  0x00007f2bdd4e713d in SvpSalInstance::ImplYield 
(this=this@entry=0x261ef40, bWait=bWait@entry=true, 
bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false)
         at libreoffice/vcl/headless/svpinst.cxx:453
     #5  0x00007f2bdd4e74a0 in SvpSalInstance::DoYield (this=0x261ef40, 
bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>)
        at libreoffice/vcl/headless/svpinst.cxx:525
    
    Change-Id: I66ec56603aeb8a7fe855253b961dafb0bc7b875e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158441
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 1551bad52cd1..ceaebf52bea8 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -221,6 +221,12 @@ void Window::InvertTracking( const tools::Rectangle& 
rRect, ShowTrackFlags nFlag
 
 IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer, void )
 {
+    if (!mpWindowImpl)
+    {
+        SAL_WARN("vcl", "ImplTrackTimerHdl has outlived dispose");
+        return;
+    }
+
     ImplSVData* pSVData = ImplGetSVData();
 
     // if Button-Repeat we have to change the timeout

Reply via email to