summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2020-05-02 20:23:05 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-02 20:27:07 +0200
commite347d6bdb852ecaf024ee4b655e4d084971503ea (patch)
treebb280658d88ca82818f248c348684e06cd435fcd /Libraries/LibGUI
parenta63e8c4a0374ffd3e20a67260753d051c9a9c8dc (diff)
downloadserenity-e347d6bdb852ecaf024ee4b655e4d084971503ea.zip
LibGUI: Properly remove auto-destroyed child windows from reified_windows.
I just spotted this while I saw you writing this code :-)
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/Window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp
index 1e7b4069d6..e0b791cab9 100644
--- a/Libraries/LibGUI/Window.cpp
+++ b/Libraries/LibGUI/Window.cpp
@@ -128,6 +128,7 @@ Window* Window::find_parent_window()
void Window::server_did_destroy()
{
+ reified_windows->remove(m_window_id);
m_window_id = 0;
m_visible = false;
m_pending_paint_event_rects.clear();
@@ -140,7 +141,6 @@ void Window::hide()
{
if (!is_visible())
return;
- reified_windows->remove(m_window_id);
auto response = WindowServerConnection::the().send_sync<Messages::WindowServer::DestroyWindow>(m_window_id);
server_did_destroy();