summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/help/HelpCompiler.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx
index e28ac9201c88..2a5fda5a79ce 100644
--- a/l10ntools/source/help/HelpCompiler.cxx
+++ b/l10ntools/source/help/HelpCompiler.cxx
@@ -55,9 +55,12 @@ HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_input
{
xmlKeepBlanksDefaultValue = 0;
char* guitmp = getenv("GUI");
- gui = (strcmp(guitmp, "UNX") ? gui : "UNIX");
- gui = (strcmp(guitmp, "MAC") ? gui : "MAC");
- gui = (strcmp(guitmp, "WNT") ? gui : "WIN");
+ if (guitmp)
+ {
+ gui = (strcmp(guitmp, "UNX") ? gui : "UNIX");
+ gui = (strcmp(guitmp, "MAC") ? gui : "MAC");
+ gui = (strcmp(guitmp, "WNT") ? gui : "WIN");
+ }
}
xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath)