From a25e234bf6df6234bd3cb53e3cf6b9a812dc4bd9 Mon Sep 17 00:00:00 2001 From: Cheerpipe Date: Mon, 15 Mar 2021 00:27:54 -0300 Subject: [PATCH] Fix null object exception on Gradient Editor DEL Hotkey --- .../Screens/GradientEditor/GradientEditorViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs b/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs index 8b905c56a..f53a099af 100644 --- a/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs +++ b/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs @@ -65,6 +65,9 @@ namespace Artemis.UI.Shared.Screens.GradientEditor public void RemoveColorStop(ColorStopViewModel colorStopViewModel) { + if (colorStopViewModel == null) + return; + ColorStopViewModels.Remove(colorStopViewModel); ColorGradient.Stops.Remove(colorStopViewModel.ColorStop); ColorGradient.OnColorValuesUpdated();