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

Gradient editor - Fix #556 again 😅

This commit is contained in:
Robert 2021-05-23 11:30:35 +02:00
parent 5865777ed2
commit dff50cbb0c

View File

@ -85,8 +85,12 @@ namespace Artemis.UI.Shared.Screens.GradientEditor
NotifyOfPropertyChange(nameof(HasMoreThanOneStop)); NotifyOfPropertyChange(nameof(HasMoreThanOneStop));
} }
public void RemoveColorStop(ColorStopViewModel colorStopViewModel) public void RemoveColorStop(ColorStopViewModel? colorStopViewModel)
{ {
// Can be null when called by the view
if (colorStopViewModel == null)
return;
ColorStopViewModels.Remove(colorStopViewModel); ColorStopViewModels.Remove(colorStopViewModel);
ColorGradient.Remove(colorStopViewModel.ColorStop); ColorGradient.Remove(colorStopViewModel.ColorStop);