From 64157090e66aeb5cec7ac1b72748ac1eeeb09dfa Mon Sep 17 00:00:00 2001 From: melex750 Date: Fri, 24 Jun 2016 17:18:11 -0400 Subject: [PATCH] Fix crash when calling method on a null object --- src/CBot/CBotInstr/CBotInstrMethode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CBot/CBotInstr/CBotInstrMethode.cpp b/src/CBot/CBotInstr/CBotInstrMethode.cpp index e0d08a99..3bdf8492 100644 --- a/src/CBot/CBotInstr/CBotInstrMethode.cpp +++ b/src/CBot/CBotInstr/CBotInstrMethode.cpp @@ -103,6 +103,7 @@ bool CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* pre if (pVar->GetPointer() == nullptr) { pj->SetError(CBotErrNull, prevToken); + return pj->Return(pile1); } if (pile1->IfStep()) return false;