summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-08-07 10:06:04 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-08-07 10:07:51 +0400
commita9210660294dd40c18814f59106164d548416032 (patch)
treeb48b23267f057932ef09b6b2b00083f90d87ca40 /l10ntools
parent988b6b4406c64cdf35fb089de25d869a9108b174 (diff)
fix crash on start
Change-Id: Ieee907d38711761f4770b802f54bd38c4e807807
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)