Browse Source

Added null check on the setter for ToolSize

Brendan Holmes 4 years ago
parent
commit
24a9e42e4d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      PixiEditor/Models/Controllers/BitmapManager.cs

+ 5 - 1
PixiEditor/Models/Controllers/BitmapManager.cs

@@ -12,6 +12,7 @@ using PixiEditor.Models.ImageManipulation;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Position;
 using PixiEditor.Models.Position;
 using PixiEditor.Models.Tools;
 using PixiEditor.Models.Tools;
+using PixiEditor.Models.Tools.ToolSettings;
 
 
 namespace PixiEditor.Models.Controllers
 namespace PixiEditor.Models.Controllers
 {
 {
@@ -50,7 +51,10 @@ namespace PixiEditor.Models.Controllers
             : 1;
             : 1;
             set
             set
             {
             {
-                SelectedTool.Toolbar.GetSetting("ToolSize").Value = value;
+                if (SelectedTool.Toolbar.GetSetting("ToolSize") is Setting toolSize)
+                {
+                    toolSize.Value = value;
+                }
             }
             }
         }
         }