Fix assertion failure in errorlogger.cpp (#3318)

This commit is contained in:
yyny 2021-07-05 08:08:15 +02:00 committed by GitHub
parent 5ffbfa4cf6
commit 3e6681e2b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -272,8 +272,10 @@ static std::string executeAddon(const AddonInfo &addonInfo,
std::istringstream istr(result);
std::string line;
while (std::getline(istr, line)) {
if (line.compare(0,9,"Checking ", 0, 9) != 0 && !line.empty() && line[0] != '{')
if (line.compare(0,9,"Checking ", 0, 9) != 0 && !line.empty() && line[0] != '{') {
result.erase(result.find_last_not_of('\n') + 1, std::string::npos); // Remove trailing newlines
throw InternalError(nullptr, "Failed to execute '" + pythonExe + " " + args + "'. " + result);
}
}
// Valid results