Fix crash when calling method on a null object

master
melex750 2016-06-24 17:18:11 -04:00
parent 51665e8396
commit 64157090e6
1 changed files with 1 additions and 0 deletions

View File

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