Prevent crash when split panel has zero width or height

This commit is contained in:
2026-07-27 20:41:43 -05:00
parent 4d589314c8
commit c27bc9e150
+4 -1
View File
@@ -162,7 +162,10 @@ namespace FlaxEngine.GUI
if (_splitterClicked)
{
SplitterValue = _orientation == Orientation.Horizontal ? location.X / Width : location.Y / Height;
if (_orientation == Orientation.Horizontal && Width > 0)
SplitterValue = location.X / Width;
else if (_orientation == Orientation.Vertical && Height > 0)
SplitterValue = location.Y / Height;
Cursor = _orientation == Orientation.Horizontal ? CursorType.SizeWE : CursorType.SizeNS;
_cursorChanged = true;
}