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

Profile editor - Fix crash when there are no devices

This commit is contained in:
Robert 2022-08-20 16:46:43 +02:00
parent a2a063c136
commit bfa1d60dec

View File

@ -81,7 +81,7 @@ public class VisualEditorView : ReactiveUserControl<VisualEditorViewModel>
private void AutoFit(bool skipTransitions) private void AutoFit(bool skipTransitions)
{ {
if (ViewModel == null) if (ViewModel == null || !ViewModel.Devices.Any())
return; return;
double left = ViewModel.Devices.Select(d => d.Rectangle.Left).Min(); double left = ViewModel.Devices.Select(d => d.Rectangle.Left).Min();