diff options
-rw-r--r-- | Servers/WindowServer/Window.cpp | 1 | ||||
-rw-r--r-- | Servers/WindowServer/Window.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Servers/WindowServer/Window.cpp b/Servers/WindowServer/Window.cpp index 5455d53b1d..a25cc5aa0c 100644 --- a/Servers/WindowServer/Window.cpp +++ b/Servers/WindowServer/Window.cpp @@ -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; diff --git a/Servers/WindowServer/Window.h b/Servers/WindowServer/Window.h index a3c1667d66..394f85a781 100644 --- a/Servers/WindowServer/Window.h +++ b/Servers/WindowServer/Window.h @@ -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; |