Fixed the newly introduced bug where not having any layer focused was crashing the app

This commit is contained in:
2022-06-17 12:55:20 +02:00
parent bbf3b66ed9
commit 2dc7035f80

View File

@@ -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();
}