Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't crash when saving game and pViewData is NULL.

Not sure if this is supposed to be able to happen, but it did.
  • Loading branch information...
commit f81230483e419074a7309990767b6dab35a30567 1 parent e5ec6df
@Cyp Cyp authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/game.cpp
View
2  src/game.cpp
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.