Fix failed assert when literal null is returned
parent
fad38cd0e9
commit
e48188b429
|
@ -135,9 +135,14 @@ bool CBotExprRetVar::Execute(CBotStack* &pj)
|
||||||
{
|
{
|
||||||
pVar = pj->GetVar();
|
pVar = pj->GetVar();
|
||||||
pVar->Update(pj->GetUserPtr());
|
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) )
|
if ( !m_next3->ExecuteVar(pVar, pile, &m_token, true, false) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (pVar)
|
if (pVar)
|
||||||
pile1->SetCopyVar(pVar);
|
pile1->SetCopyVar(pVar);
|
||||||
|
|
Loading…
Reference in New Issue