diff options
-rw-r--r-- | CruUI/timer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CruUI/timer.cpp b/CruUI/timer.cpp index f596dde4..ce800eee 100644 --- a/CruUI/timer.cpp +++ b/CruUI/timer.cpp @@ -22,7 +22,11 @@ namespace cru if (find_result != map_.cend()) { ::KillTimer(Application::GetInstance()->GetGodWindow()->GetHandle(), id); - map_.erase(find_result); + // When timer is killed in tick action, we need to retain the action itself until the action finishes, so InvokeLater! + InvokeLater([=] + { + map_.erase(find_result); + }); } } |