From 302f6e0fc5368e00cf74f67ce84951f1a1fb5b54 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 13 Aug 2024 21:42:50 +0200 Subject: [PATCH] Added an assertion to GuiComponent::setSize() to check for negative mSize values --- es-core/src/GuiComponent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/es-core/src/GuiComponent.cpp b/es-core/src/GuiComponent.cpp index 4518123de..01b7e0783 100644 --- a/es-core/src/GuiComponent.cpp +++ b/es-core/src/GuiComponent.cpp @@ -115,6 +115,8 @@ void GuiComponent::setOrigin(float x, float y) void GuiComponent::setSize(const float w, const float h) { + assert(w >= 0.0f && h >= 0.0f); + if (mSize.x == w && mSize.y == h) return;