forked from Mirrors/openclonk
C4FO_Exclude: explictly ignore non-valid objects
This does not change behavior at all, as nil-objects were later ignored in the check. Now the check is not even executed. This does make it more likely that refactoring will keep the ignoring behaviour in place, though. Loosely related to PR #61 - has nothing to do with the solution, though.install-platforms
parent
de2b44c126
commit
ca0e99e3ce
|
@ -84,7 +84,12 @@ C4FindObject *C4FindObject::CreateByValue(const C4Value &DataVal, C4SortObject *
|
|||
}
|
||||
|
||||
case C4FO_Exclude:
|
||||
return new C4FindObjectExclude(Data[1].getObj());
|
||||
{
|
||||
C4Object *obj = Data[1].getObj();
|
||||
if (!obj) return nullptr;
|
||||
|
||||
return new C4FindObjectExclude(obj);
|
||||
}
|
||||
|
||||
case C4FO_ID:
|
||||
return new C4FindObjectDef(Data[1].getPropList());
|
||||
|
|
Loading…
Reference in New Issue