Add workaround for null pointer reference bug on recycling in factory. Closes ticket:4035.

master
per 2013-11-17 15:18:46 +01:00
parent d4dda2323a
commit f0bb142e45
1 changed files with 2 additions and 1 deletions

View File

@ -2355,7 +2355,7 @@ static void intProcessObject(UDWORD id)
{
statButID = id;
}
if (psObj->selected)
if (psObj && psObj->selected)
{
psObj->selected = false;
widgSetButtonState(psWScreen, statButID, 0);
@ -2484,6 +2484,7 @@ static void intProcessObject(UDWORD id)
{
/* Find the object that the stats ID refers to */
psObj = intGetObject(id);
ASSERT_OR_RETURN(, psObj, "Missing referred to object id %u", id);
intResetWindows(psObj);