From 1e786b8e3154d583688308b07363b6ab1cf7e40c Mon Sep 17 00:00:00 2001 From: teinarss Date: Sat, 5 Oct 2019 10:47:52 +0200 Subject: [PATCH] Add null check to EditorDefaultBrush for resources --- OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs index affcc63847..40371a28d7 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs @@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets if (underCursor != null && underCursor != SelectedActor) editorActionManager.Add(new RemoveActorAction(editorLayer, underCursor)); - if (mapResources.Contains(cell) && mapResources[cell].Type != 0) + if (type != null && mapResources.Contains(cell) && mapResources[cell].Type != 0) editorActionManager.Add(new RemoveResourceAction(mapResources, cell, type)); }