Add workaround for null pointer reference bug on recycling in factory. Closes ticket:4035.
parent
d4dda2323a
commit
f0bb142e45
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue