forked from Mirrors/openclonk
C4Object: Call Contents.GetLastObject() instead of accessing Last link directly
parent
b2fcc2ee32
commit
d84d42717e
|
@ -4585,10 +4585,10 @@ bool C4Object::PutAwayUnusedObject(C4Object *pToMakeRoomForObject)
|
|||
else
|
||||
{
|
||||
// is there any unused object to put away?
|
||||
if (!Contents.Last) return false;
|
||||
if (!Contents.GetLastObject()) return false;
|
||||
// defaultly, it's the last object in the list
|
||||
// (contents list cannot have invalid status-objects)
|
||||
pUnusedObject = Contents.Last->Obj;
|
||||
pUnusedObject = Contents.GetLastObject();
|
||||
}
|
||||
// no object to put away? fail
|
||||
if (!pUnusedObject) return false;
|
||||
|
|
Loading…
Reference in New Issue