From ca094df46b4780dcfd66bed41bbe51a768767909 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 21 Jun 2020 00:57:11 +0200 Subject: [PATCH] map_extract: Only access map info if it exists Noticed on map Paranormal --- src/tools/map_extract.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tools/map_extract.cpp b/src/tools/map_extract.cpp index 1ef11d228..7f51eb614 100644 --- a/src/tools/map_extract.cpp +++ b/src/tools/map_extract.cpp @@ -26,10 +26,13 @@ bool Process(IStorage *pStorage, const char *pMapName, const char *pPathSave) CMapItemInfo *pInfo = (CMapItemInfo *)Map.FindItem(MAPITEMTYPE_INFO, 0); - dbg_msg("map_extract", "author: %s", (char *)Map.GetData(pInfo->m_Author)); - dbg_msg("map_extract", "version: %s", (char *)Map.GetData(pInfo->m_MapVersion)); - dbg_msg("map_extract", "credits: %s", (char *)Map.GetData(pInfo->m_Credits)); - dbg_msg("map_extract", "license: %s", (char *)Map.GetData(pInfo->m_License)); + if(pInfo) + { + dbg_msg("map_extract", "author: %s", (char *)Map.GetData(pInfo->m_Author)); + dbg_msg("map_extract", "version: %s", (char *)Map.GetData(pInfo->m_MapVersion)); + dbg_msg("map_extract", "credits: %s", (char *)Map.GetData(pInfo->m_Credits)); + dbg_msg("map_extract", "license: %s", (char *)Map.GetData(pInfo->m_License)); + } int Start, Num;