Don't crash when saving game and pViewData is NULL.
Not sure if this is supposed to be able to happen, but it did.master
parent
e5ec6df5a1
commit
f81230483e
|
@ -6163,7 +6163,7 @@ static bool writeMessageFile(const char *pFileName)
|
|||
else
|
||||
{
|
||||
VIEWDATA *pViewData = (VIEWDATA*)psMessage->pViewData;
|
||||
ini.setValue("name", pViewData->pName);
|
||||
ini.setValue("name", pViewData != NULL? pViewData->pName : "NULL");
|
||||
}
|
||||
ini.setValue("read", psMessage->read); // flag to indicate whether message has been read; not that this is/was _not_ read by loading code!?
|
||||
ASSERT(player == psMessage->player, "Bad player number (%d == %d)", player, psMessage->player);
|
||||
|
|
Loading…
Reference in New Issue