diff options
author | Juergen Funk <juergen.funk_ml@cib.de> | 2015-05-06 14:12:15 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-06 15:37:25 +0000 |
commit | 45ed509f71aeef52cb86cc3d88aa2bcf86334bb7 (patch) | |
tree | 742e5f2aef80715f3e9f1025ec2f0c239a35e207 | |
parent | 848dc76e76c1c4a9040be4a0088c4d4527af6f40 (diff) |
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@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | vcl/win/source/app/saltimer.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx index 18f666c66dfa..c6f04be986fe 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 ) |