1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

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

This commit is contained in:
SpoinkyNL 2020-09-06 20:29:22 +02:00
parent f105a10e4d
commit 7bcac904fc

View File

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