map_extract: Only access map info if it exists

Noticed on map Paranormal
This commit is contained in:
def 2020-06-21 00:57:11 +02:00
parent 17e77d73bb
commit ca094df46b

View file

@ -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;