mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:48:11 +00:00
WindowServer: Assert that a window is not being set as empty
This commit is contained in:
parent
96bfbfca9b
commit
cef3988e30
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)
|
void Window::set_rect(const Gfx::Rect& rect)
|
||||||
{
|
{
|
||||||
|
ASSERT(!rect.is_empty());
|
||||||
Gfx::Rect old_rect;
|
Gfx::Rect old_rect;
|
||||||
if (m_rect == rect)
|
if (m_rect == rect)
|
||||||
return;
|
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(int x, int y, int width, int height) { set_rect({ x, y, width, height }); }
|
||||||
void set_rect_without_repaint(const Gfx::Rect& rect)
|
void set_rect_without_repaint(const Gfx::Rect& rect)
|
||||||
{
|
{
|
||||||
|
ASSERT(!rect.is_empty());
|
||||||
if (m_rect == rect)
|
if (m_rect == rect)
|
||||||
return;
|
return;
|
||||||
auto old_rect = m_rect;
|
auto old_rect = m_rect;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue