From 84727f9a6c83e78c466cfd63c1a723833abc1132 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Wed, 15 Jul 2020 01:37:48 +0800 Subject: [PATCH] Don't show error dialog when no XML entity is specified --- src/xmlpromptgenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xmlpromptgenerator.cpp b/src/xmlpromptgenerator.cpp index bf75b35..1374340 100644 --- a/src/xmlpromptgenerator.cpp +++ b/src/xmlpromptgenerator.cpp @@ -311,7 +311,8 @@ int XmlPromptGenerator::parseGrammar ( publicId , systemId , baseFileName ) ); if ( !source.get() ) { - wxLogError ( _T("Cann't open '%s'"), systemId.c_str() ); + if ( !( publicId.empty() && systemId.empty() ) ) + wxLogError ( _T("Cann't open '%s'"), systemId.c_str() ); return XML_STATUS_ERROR; }