Skip to content

Commit 003b134

Browse files
committed
Fix crash when opening action history window after erasing overlay
1 parent 01dda2b commit 003b134

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/TSMapEditor/Mutations/Classes/PlaceOverlayMutation.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ public PlaceOverlayMutation(IMutationTarget mutationTarget, OverlayType overlayT
2828

2929
public override string GetDisplayString()
3030
{
31-
return $"Place overlay '{overlayType.GetEditorDisplayName()}' at {cellCoords} with a brush size of {brush}";
31+
if (overlayType != null)
32+
return $"Place overlay '{overlayType.GetEditorDisplayName()}' at {cellCoords} with a brush size of {brush}";
33+
else
34+
return $"Erase overlay at {cellCoords} with a brush size of {brush}";
3235
}
3336

3437
public override void Perform()

0 commit comments

Comments
 (0)