mirror of
https://github.com/ppy/osu
synced 2024-12-16 03:45:46 +00:00
Merge pull request #12943 from nbvdkamp/fix-zero-area-skin-element-scale-crash
Prevent skin editor crash when scaling 0 area drawables
This commit is contained in:
commit
34d1d5198f
@ -59,6 +59,10 @@ namespace osu.Game.Skinning.Editor
|
||||
// the selection quad is always upright, so use an AABB rect to make mutating the values easier.
|
||||
var selectionRect = getSelectionQuad().AABBFloat;
|
||||
|
||||
// If the selection has no area we cannot scale it
|
||||
if (selectionRect.Area == 0)
|
||||
return false;
|
||||
|
||||
// copy to mutate, as we will need to compare to the original later on.
|
||||
var adjustedRect = selectionRect;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user