aboutsummaryrefslogtreecommitdiff
path: root/src/ui/window.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-11 17:38:05 +0800
committercrupest <crupest@outlook.com>2018-11-11 17:38:05 +0800
commit61b44c223df9c3d2a6daec85f693a2b9a406f5c9 (patch)
tree2594670863ef855222cb5af1798807f2c263ab66 /src/ui/window.cpp
parent3cc588ade5ac08e53c406cea6bfcaaafac4346cf (diff)
downloadcru-61b44c223df9c3d2a6daec85f693a2b9a406f5c9.tar.gz
cru-61b44c223df9c3d2a6daec85f693a2b9a406f5c9.tar.bz2
cru-61b44c223df9c3d2a6daec85f693a2b9a406f5c9.zip
Add popup menu. Fix a potential bug in window destroy.
Diffstat (limited to 'src/ui/window.cpp')
-rw-r--r--src/ui/window.cpp2
1 files changed, 1 insertions, 1 deletions
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() {