diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/translation/poparser.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index dc201d4b3..2c880ba27 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -46,8 +46,15 @@ void PoParser::openFile(std::string name) int size; char *buf = static_cast<char*>(resman->loadFile(getFileName(name), size)); - mFile.str(std::string(buf, size)); - free(buf); + if (buf) + { + mFile.str(std::string(buf, size)); + free(buf); + } + else + { + mFile.clear(); + } } PoDict *PoParser::load(const std::string &lang, const std::string &fileName, |