WindowServer: Assert that a window is not being set as empty

This commit is contained in:
Shannon Booth 2020-02-11 21:16:43 +13:00 committed by Andreas Kling
parent 96bfbfca9b
commit cef3988e30
Notes: sideshowbarker 2024-07-19 09:27:05 +09:00
2 changed files with 2 additions and 0 deletions

View File

@ -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;

View File

@ -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;