mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-17 07:41:54 +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
Notes:
sideshowbarker
2024-07-19 00:45:37 +09:00
Author: https://github.com/linusg
Commit: fe88f46bc9
Pull-request: https://github.com/SerenityOS/serenity/pull/4451
Issue: https://github.com/SerenityOS/serenity/issues/4450
Reviewed-by: https://github.com/bcoles ✅
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