Device visualizer - Fixed a crash when a device has 0 width/height

This commit is contained in:
SpoinkyNL committed 2020-09-06 20:29:22 +02:00
1 parent f105a10e4d
commit 7bcac904fc
1 file changed
+3
@@ -136,6 +136,9 @@ namespace Artemis.UI.Shared
return Size.Empty; return Size.Empty;
var deviceSize = MeasureDevice(); var deviceSize = MeasureDevice();
if (deviceSize.Width <= 0 || deviceSize.Height <= 0)
return Size.Empty;
return ResizeKeepAspect(deviceSize, availableSize.Width, availableSize.Height); return ResizeKeepAspect(deviceSize, availableSize.Width, availableSize.Height);
} }