From 4a77a4080d8126dba16614c53a4d2a9c61fca369 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 21 May 2021 14:38:15 +0100 Subject: [PATCH] Fix Coverity warning. --- common/libeval_compiler/libeval_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/libeval_compiler/libeval_compiler.cpp b/common/libeval_compiler/libeval_compiler.cpp index 71d30c8250..025ae3078b 100644 --- a/common/libeval_compiler/libeval_compiler.cpp +++ b/common/libeval_compiler/libeval_compiler.cpp @@ -1114,13 +1114,13 @@ void UOP::Exec( CONTEXT* ctx ) if( ctx->HasErrorCallback() ) { - if( arg1->GetType() == VT_STRING && arg2->GetType() == VT_NUMERIC ) + if( arg1 && arg1->GetType() == VT_STRING && arg2 && arg2->GetType() == VT_NUMERIC ) { ctx->ReportError( wxString::Format( _( "Type mismatch between '%s' and %lf" ), arg1->AsString(), arg2->AsDouble() ) ); } - else if( arg1->GetType() == VT_NUMERIC && arg2->GetType() == VT_STRING ) + else if( arg1 && arg1->GetType() == VT_NUMERIC && arg2 && arg2->GetType() == VT_STRING ) { ctx->ReportError( wxString::Format( _( "Type mismatch between %lf and '%s'" ), arg1->AsDouble(),