C4Object: Call Contents.GetLastObject() instead of accessing Last link directly

issue1247
Martin Plicht 2014-10-24 23:03:19 +02:00
parent b2fcc2ee32
commit d84d42717e
1 changed files with 2 additions and 2 deletions

View File

@ -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;