diff --git a/common/libeval_compiler/libeval_compiler.cpp b/common/libeval_compiler/libeval_compiler.cpp index c395c4a6b8..cbbb1c3a5a 100644 --- a/common/libeval_compiler/libeval_compiler.cpp +++ b/common/libeval_compiler/libeval_compiler.cpp @@ -1150,7 +1150,9 @@ void UOP::Exec( CONTEXT* ctx ) return; case TR_OP_METHOD_CALL: - m_func( ctx, m_ref.get() ); + if( m_func ) + m_func( ctx, m_ref.get() ); + return; default: @@ -1283,9 +1285,8 @@ VALUE* UCODE::Run( CONTEXT* ctx ) } catch(...) { - // rules which fail outright should not be fired - std::unique_ptr temp_false = std::make_unique( 0 ); - return ctx->StoreValue( temp_false.get() ); + // rules which fail outright should not be fired; return 0/false + return ctx->StoreValue( new VALUE( 0 ) ); } if( ctx->SP() == 1 ) @@ -1301,8 +1302,7 @@ VALUE* UCODE::Run( CONTEXT* ctx ) wxASSERT( ctx->SP() == 1 ); // non-well-formed rules should not be fired on a release build - std::unique_ptr temp_false = std::make_unique( 0 ); - return ctx->StoreValue( temp_false.get() ); + return ctx->StoreValue( new VALUE( 0 ) ); } }