Push a non-existent ref's value as 0. (Don't just crash.)
Fixes https://gitlab.com/kicad/code/kicad/issues/7971
This commit is contained in:
parent
4073153e75
commit
b1fa02bcc8
|
@ -1088,8 +1088,11 @@ void UOP::Exec( CONTEXT* ctx )
|
|||
{
|
||||
case TR_UOP_PUSH_VAR:
|
||||
{
|
||||
auto value = ctx->AllocValue();
|
||||
value->Set( m_ref->GetValue( ctx ) );
|
||||
VALUE* value = ctx->AllocValue();
|
||||
|
||||
if( m_ref )
|
||||
value->Set( m_ref->GetValue( ctx ) );
|
||||
|
||||
ctx->Push( value );
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue