From 61b44c223df9c3d2a6daec85f693a2b9a406f5c9 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 11 Nov 2018 17:38:05 +0800 Subject: Add popup menu. Fix a potential bug in window destroy. --- src/ui/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/window.cpp') diff --git a/src/ui/window.cpp b/src/ui/window.cpp index f8e6d4f3..862267fc 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -627,7 +627,7 @@ namespace cru::ui WindowManager::GetInstance()->UnregisterWindow(hwnd_); hwnd_ = nullptr; if (delete_this_on_destroy_) - delete this; + InvokeLater([this]{ delete this; }); } void Window::OnPaintInternal() { -- cgit v1.2.3