Fixed potential crash in drawDialogueMessage(): The function should terminate

if, for some reason, messagePtr is NULL.

svn-id: r21833
This commit is contained in:
Torbjörn Andersson 2006-04-12 22:07:41 +00:00
parent 19a1cdfe85
commit f5ab0e5578

View File

@ -2384,6 +2384,7 @@ void drawDialogueMessage(byte msgIdx, int16 x, int16 y, int16 width, int16 color
if (!messagePtr) {
freeOverlay(msgIdx, 2);
return;
}
var20 += strlen(messagePtr);