[colobot] 128/145: Fix crash when calling method on a null object

Didier Raboud odyx at moszumanska.debian.org
Mon Jul 11 12:56:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 64157090e66aeb5cec7ac1b72748ac1eeeb09dfa
Author: melex750 <melex750 at users.noreply.github.com>
Date:   Fri Jun 24 17:18:11 2016 -0400

    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 e0d08a9..3bdf849 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list