Browse Source

Null check

Krzysztof Krysiński 2 months ago
parent
commit
c5bb9d08e7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/PixiEditor/ViewModels/SubViewModels/ColorsViewModel.cs

+ 3 - 0
src/PixiEditor/ViewModels/SubViewModels/ColorsViewModel.cs

@@ -404,6 +404,9 @@ internal class ColorsViewModel : SubViewModel<ViewModelMain>, IColorsHandler
     [Commands_Command.Internal("PixiEditor.Colors.SelectColor")]
     public void SelectColor(PaletteColor color)
     {
+        if (color == null)
+            return;
+
         PrimaryColor = color.ToColor();
     }