Kaydet (Commit) 45ed509f authored tarafından Juergen Funk's avatar Juergen Funk Kaydeden (comit) Michael Stahl

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/15649Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 848dc76e
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment