[colobot] 19/74: Fix failed assert when literal null is returned
Didier Raboud
odyx at moszumanska.debian.org
Mon Nov 7 07:50:00 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 e48188b42931b34dbc753b47aca3b5f198e9eac6
Author: melex750 <melex750 at users.noreply.github.com>
Date: Sat Aug 6 04:56:57 2016 -0400
Fix failed assert when literal null is returned
---
src/CBot/CBotInstr/CBotExprRetVar.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/CBot/CBotInstr/CBotExprRetVar.cpp b/src/CBot/CBotInstr/CBotExprRetVar.cpp
index 28b0fa8..223058e 100644
--- a/src/CBot/CBotInstr/CBotExprRetVar.cpp
+++ b/src/CBot/CBotInstr/CBotExprRetVar.cpp
@@ -135,9 +135,14 @@ bool CBotExprRetVar::Execute(CBotStack* &pj)
{
pVar = pj->GetVar();
pVar->Update(pj->GetUserPtr());
+ if (pVar->GetType(CBotVar::GetTypeMode::CLASS_AS_POINTER) == CBotTypNullPointer)
+ {
+ pile1->SetError(CBotErrNull, &m_token);
+ return pj->Return(pile1);
+ }
if ( !m_next3->ExecuteVar(pVar, pile, &m_token, true, false) )
- return false;
+ return false;
if (pVar)
pile1->SetCopyVar(pVar);
--
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