Added an assertion to GuiComponent::setSize() to check for negative mSize values

This commit is contained in:
Leon Styhre 2024-08-13 21:42:50 +02:00
parent eccc5095fb
commit 302f6e0fc5

View file

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