fix timer cleanup

This commit is contained in:
henrypp committed 2019-07-02 08:31:16 +06:00
1 parent b48a68b4fa
commit 493fd07dbb
1 file changed
+9 -1
+9 -1
View File
@@ -10,7 +10,15 @@ bool _app_timer_set (HWND hwnd, PITEM_APP ptr_app, time_t seconds)
if (seconds <= 0)
{
ptr_app->timer = 0;
if (ptr_app->timer)
ptr_app->timer = 0;
if (ptr_app->htimer)
{
DeleteTimerQueueTimer (config.htimer, ptr_app->htimer, nullptr);
ptr_app->htimer = nullptr;
}
return false;
}