From 2dc7035f80ff1a5b4b876606b290659547026553 Mon Sep 17 00:00:00 2001 From: maxluli Date: Fri, 17 Jun 2022 12:55:20 +0200 Subject: [PATCH] Fixed the newly introduced bug where not having any layer focused was crashing the app --- Paint_2/Form1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Paint_2/Form1.cs b/Paint_2/Form1.cs index 4bb5639..b1f043a 100644 --- a/Paint_2/Form1.cs +++ b/Paint_2/Form1.cs @@ -96,7 +96,7 @@ namespace Paint_2 DebugLabel.Text = ""; PaintTool currentTool = Project.GetCurrentTool(SelectedLayers); - if (currentTool.NeedsFullRefresh) + if (currentTool != null && currentTool.NeedsFullRefresh) { canvas.Image = Project.ForcePaintLayers(); }