WindowServer: Assert that a window is not being set as empty
This commit is contained in:
parent
96bfbfca9b
commit
cef3988e30
Notes:
sideshowbarker
2024-07-19 09:27:05 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/cef3988e301 Pull-request: https://github.com/SerenityOS/serenity/pull/1209 Reviewed-by: https://github.com/awesomekling
2 changed files with 2 additions and 0 deletions
|
@ -96,6 +96,7 @@ void Window::set_title(const String& title)
|
|||
|
||||
void Window::set_rect(const Gfx::Rect& rect)
|
||||
{
|
||||
ASSERT(!rect.is_empty());
|
||||
Gfx::Rect old_rect;
|
||||
if (m_rect == rect)
|
||||
return;
|
||||
|
|
|
@ -142,6 +142,7 @@ public:
|
|||
void set_rect(int x, int y, int width, int height) { set_rect({ x, y, width, height }); }
|
||||
void set_rect_without_repaint(const Gfx::Rect& rect)
|
||||
{
|
||||
ASSERT(!rect.is_empty());
|
||||
if (m_rect == rect)
|
||||
return;
|
||||
auto old_rect = m_rect;
|
||||
|
|
Loading…
Add table
Reference in a new issue