Fix logic bug found by Coverity.

This commit is contained in:
Jeff Young 2021-06-24 11:14:04 +01:00
parent 8502fd6877
commit a89f6404b4
1 changed files with 7 additions and 3 deletions

View File

@ -87,10 +87,14 @@ static void existsOnLayer( LIBEVAL::CONTEXT* aCtx, void *self )
if( !item )
return;
if( !arg && aCtx->HasErrorCallback() )
if( !arg )
{
aCtx->ReportError( wxString::Format( _( "Missing argument to '%s'" ),
wxT( "existsOnLayer()" ) ) );
if( aCtx->HasErrorCallback() )
{
aCtx->ReportError( wxString::Format( _( "Missing argument to '%s'" ),
wxT( "existsOnLayer()" ) ) );
}
return;
}