mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[host] windows: do not complain about failed timer destruction at exit
When our window is destroyed, our timers are also destroyed. This causes our attempt at destruction to fail. Instead, set MessageHWND to NULL in the WM_DESTROY handler and don't try destroying the timers if the window is gone.
This commit is contained in:
parent
6382fc11af
commit
3cf0257f34
@ -65,7 +65,7 @@ void lgTimerDestroy(LGTimer * timer)
|
||||
{
|
||||
if (timer->running)
|
||||
{
|
||||
if (!KillTimer(MessageHWND, timer->handle))
|
||||
if (MessageHWND && !KillTimer(MessageHWND, timer->handle))
|
||||
DEBUG_ERROR("failed to destroy the timer");
|
||||
}
|
||||
|
||||
|
@ -205,6 +205,7 @@ LRESULT CALLBACK DummyWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
case WM_DESTROY:
|
||||
Shell_NotifyIcon(NIM_DELETE, &app.iconData);
|
||||
MessageHWND = NULL;
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user