[Libreoffice-commits] core.git: vcl/win
Juergen Funk
juergen.funk_ml at cib.de
Wed May 6 08:37:49 PDT 2015
vcl/win/source/app/saltimer.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 45ed509f71aeef52cb86cc3d88aa2bcf86334bb7
Author: Juergen Funk <juergen.funk_ml at cib.de>
Date: Wed May 6 14:12:15 2015 +0200
Hidden exception in "SalTimerProc" when exit swriter (WIN)
Only found the exception with the Debugger, when exit the swriter.
The appliction stop the SalTimer, but the own message
(SAL_MSG_TIMER_CALLBACK) is in the message-queue and restart the
timer again. After that, the SalData would be delete and then in
SalTimerProc use the SalData, then exception.
Change-Id: I8e02a38d4e741cfd31de605cb5b172b28a0909fb
Reviewed-on: https://gerrit.libreoffice.org/15649
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx
index 18f666c..c6f04be 100644
--- a/vcl/win/source/app/saltimer.cxx
+++ b/vcl/win/source/app/saltimer.cxx
@@ -39,6 +39,13 @@ void ImplSalStopTimer(SalData* pSalData)
HANDLE hTimer = pSalData->mnTimerId;
pSalData->mnTimerId = 0;
DeleteTimerQueueTimer(NULL, hTimer, INVALID_HANDLE_VALUE);
+ MSG aMsg;
+ while (PeekMessageW(&aMsg, 0, SAL_MSG_TIMER_CALLBACK, SAL_MSG_TIMER_CALLBACK, PM_REMOVE))
+ {
+ // just remove all the SAL_MSG_TIMER_CALLBACKs
+ // when the application end, this SAL_MSG_TIMER_CALLBACK start the timer again
+ // and then crashed in "SalTimerProc" when the object "SalData" was deleted
+ }
}
void ImplSalStartTimer( sal_uLong nMS, bool bMutex )
More information about the Libreoffice-commits
mailing list