diff options
Diffstat (limited to 'typeparser.cpp')
| -rw-r--r-- | typeparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/typeparser.cpp b/typeparser.cpp index 8fe20a1f..18ecac08 100644 --- a/typeparser.cpp +++ b/typeparser.cpp @@ -97,7 +97,9 @@ std::string TypeParser::FormatParseErrors(const std::vector<TypeParserError>& er BNFreeString(apiError.fileName); } - return string; + std::string result = string ? string : ""; + BNFreeString(string); + return result; } |
