Merge pull request #388 from Dmitry-Me/resolveIssue1037100
Resolve CID 1037100: possible dereference of _errorLogger nullpointer
This commit is contained in:
commit
2d06786c3f
|
@ -1321,16 +1321,9 @@ std::list<std::string> Preprocessor::getcfgs(const std::string &filedata, const
|
||||||
if (par != 0) {
|
if (par != 0) {
|
||||||
std::ostringstream lineStream;
|
std::ostringstream lineStream;
|
||||||
lineStream << __LINE__;
|
lineStream << __LINE__;
|
||||||
|
std::string errorId = "preprocessor" + lineStream.str();
|
||||||
ErrorLogger::ErrorMessage errmsg;
|
std::string errorText = "mismatching number of '(' and ')' in this line: " + def;
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
writeError(filename, linenr, _errorLogger, errorId, errorText);
|
||||||
loc.setfile(filename);
|
|
||||||
loc.line = linenr;
|
|
||||||
errmsg._callStack.push_back(loc);
|
|
||||||
errmsg._severity = Severity::fromString("error");
|
|
||||||
errmsg.setmsg("mismatching number of '(' and ')' in this line: " + def);
|
|
||||||
errmsg._id = "preprocessor" + lineStream.str();
|
|
||||||
_errorLogger->reportErr(errmsg);
|
|
||||||
ret.clear();
|
ret.clear();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue