mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Device visualizer - Fixed a crash when a device has 0 width/height
This commit is contained in:
1 parent
f105a10e4d
commit
7bcac904fc
1 file changed
+3
@@ -136,6 +136,9 @@ namespace Artemis.UI.Shared
|
||||
return Size.Empty;
|
||||
|
||||
var deviceSize = MeasureDevice();
|
||||
if (deviceSize.Width <= 0 || deviceSize.Height <= 0)
|
||||
return Size.Empty;
|
||||
|
||||
return ResizeKeepAspect(deviceSize, availableSize.Width, availableSize.Height);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user