mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:05:08 +00:00
LibGUI: Don't assume main widget exists in Window::handle_resize_event()
Just like the other event handler functions, handle_resize_event() shouldn't assume that the window has a main widget (which is being resized in this case). Fixes #4450.
This commit is contained in:
parent
573d5b7ff2
commit
fe88f46bc9
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue