mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 22:25:07 +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,6 +377,7 @@ void Window::handle_resize_event(ResizeEvent& event)
|
||||||
m_pending_paint_event_rects.append({ {}, new_size });
|
m_pending_paint_event_rects.append({ {}, new_size });
|
||||||
}
|
}
|
||||||
m_rect_when_windowless = { {}, new_size };
|
m_rect_when_windowless = { {}, new_size };
|
||||||
|
if (m_main_widget)
|
||||||
m_main_widget->set_relative_rect({ {}, new_size });
|
m_main_widget->set_relative_rect({ {}, new_size });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue