Fix crash when calling method on a null object
parent
51665e8396
commit
64157090e6
|
@ -103,6 +103,7 @@ bool CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* pre
|
||||||
if (pVar->GetPointer() == nullptr)
|
if (pVar->GetPointer() == nullptr)
|
||||||
{
|
{
|
||||||
pj->SetError(CBotErrNull, prevToken);
|
pj->SetError(CBotErrNull, prevToken);
|
||||||
|
return pj->Return(pile1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pile1->IfStep()) return false;
|
if (pile1->IfStep()) return false;
|
||||||
|
|
Loading…
Reference in New Issue