mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Verify m_window_id is not-zero in set_maximized
Window::set_maximized requires non-zero window id to be a valid call, i.e. calling Window::show beforehand. A verify statement before the server call can help developers by hinting correct usage.
This commit is contained in:
parent
0459a111b2
commit
6f594b36f5
Notes:
sideshowbarker
2024-07-18 10:01:50 +09:00
Author: https://github.com/abyesilyurt Commit: https://github.com/SerenityOS/serenity/commit/6f594b36f55
1 changed files with 1 additions and 0 deletions
|
@ -948,6 +948,7 @@ bool Window::is_maximized() const
|
|||
|
||||
void Window::set_maximized(bool maximized)
|
||||
{
|
||||
VERIFY(m_window_id != 0);
|
||||
WindowServerConnection::the().async_set_maximized(m_window_id, maximized);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue