summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGUI/Window.cpp')
-rw-r--r--Libraries/LibGUI/Window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp
index 7389b1d350..450e0b4e82 100644
--- a/Libraries/LibGUI/Window.cpp
+++ b/Libraries/LibGUI/Window.cpp
@@ -377,7 +377,8 @@ void Window::handle_resize_event(ResizeEvent& event)
m_pending_paint_event_rects.append({ {}, new_size });
}
m_rect_when_windowless = { {}, new_size };
- m_main_widget->set_relative_rect({ {}, new_size });
+ if (m_main_widget)
+ m_main_widget->set_relative_rect({ {}, new_size });
}
void Window::handle_input_entered_or_left_event(Core::Event& event)