diff options
author | Aziz Berkay Yesilyurt <abyesilyurt@gmail.com> | 2021-07-06 21:38:07 +0200 |
---|---|---|
committer | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-07-09 13:32:30 +0430 |
commit | 6f594b36f550ddfed614997e8fbdae39b49fb00d (patch) | |
tree | d1f8ca831a3176b93686fae28eb058b70525e815 /Userland | |
parent | 0459a111b2b08237c59fc60da0cb2581037c1716 (diff) | |
download | serenity-6f594b36f550ddfed614997e8fbdae39b49fb00d.zip |
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.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/Window.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp index 019737f006..c2b29d3e7e 100644 --- a/Userland/Libraries/LibGUI/Window.cpp +++ b/Userland/Libraries/LibGUI/Window.cpp @@ -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); } |