Browse Source

Fixed null exception

Krzysztof Krysiński 2 years ago
parent
commit
5239efc1a2

+ 1 - 1
src/PixiEditor/Data/Localization/Languages/en.json

@@ -570,7 +570,7 @@
   "ERROR_NO_CLASS_ENTRY": "Extension class entry is missing on path '{0}'.",
   "ERROR_NO_ENTRY_ASSEMBLY": "Extension entry assembly is missing on path '{0}'.",
   "ERROR_MISSING_ADDITIONAL_CONTENT": "Your current setup doesn't allow loading this extension. Perhaps you don't own it or don't have it installed. You can purchase it here '{0}'.",
-  
+
   "BUY_SUPPORTER_PACK": "Buy Supporter Pack",
 
   "NEWS": "News",

+ 1 - 1
src/PixiEditor/ViewModels/SubViewModels/Main/ToolsViewModel.cs

@@ -203,7 +203,7 @@ internal class ToolsViewModel : SubViewModel<ViewModelMain>
     }
 
     [Evaluator.CanExecute("PixiEditor.Tools.CanChangeToolSize")]
-    public bool CanChangeToolSize() => Owner.ToolsSubViewModel.ActiveTool.Toolbar is BasicToolbar
+    public bool CanChangeToolSize() => Owner.ToolsSubViewModel.ActiveTool?.Toolbar is BasicToolbar
                                        && Owner.ToolsSubViewModel.ActiveTool is not PenToolViewModel
                                        {
                                            PixelPerfectEnabled: true