exit: only wait for completion if a handler was set

This commit is contained in:
Jean-Francois Dockes 2019-03-06 15:55:19 +01:00
parent 9386ed6d9f
commit 36b4657631

View File

@ -184,12 +184,12 @@ LRESULT CALLBACK MainWndProc(HWND hwnd , UINT msg , WPARAM wParam,
{
if (l_sigcleanup) {
l_sigcleanup(SIGINT);
LOGDEB("MainWndProc: got end message, waiting for work finished\n");
DWORD res = WaitForSingleObject(eWorkFinished, INFINITE);
if (res != WAIT_OBJECT_0) {
LOGERR("MainWndProc: exit ack wait failed\n" );
}
}
LOGDEB("MainWndProc: got end message, waiting for work finished\n" );
DWORD res = WaitForSingleObject(eWorkFinished, INFINITE);
if (res != WAIT_OBJECT_0) {
LOGERR("MainWndProc: exit ack wait failed\n" );
}
LOGDEB("MainWindowProc: got exit ready event, exiting\n" );
}
break;