From b16d238c8a1fbe02fac0bb25bc8f46867ebaaf8f Mon Sep 17 00:00:00 2001 From: haven1433 Date: Thu, 30 May 2024 19:47:28 -0500 Subject: [PATCH] fix crash --- src/HexManiac.Core/ViewModels/Map/BlockMapViewModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/HexManiac.Core/ViewModels/Map/BlockMapViewModel.cs b/src/HexManiac.Core/ViewModels/Map/BlockMapViewModel.cs index 234e0425..002c368a 100644 --- a/src/HexManiac.Core/ViewModels/Map/BlockMapViewModel.cs +++ b/src/HexManiac.Core/ViewModels/Map/BlockMapViewModel.cs @@ -2388,6 +2388,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map { if (allOverworldSprites == null) allOverworldSprites = RenderOWs(model); if (defaultOverworldSprite == null) defaultOverworldSprite = GetDefaultOW(model); var map = GetMapModel(); + if (map == null) return null; var eventsTable = map.GetSubTable("events"); if (eventsTable == null) return null; var eventElements = eventsTable[0];