Fix #1485 (cppcheck.exe 1.41 crashes when calling with option --errorlist)
http://sourceforge.net/apps/trac/cppcheck/ticket/1485
This commit is contained in:
parent
525ed61831
commit
a0d6da506b
|
@ -118,6 +118,10 @@ protected:
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
||||||
for (std::list<const Token *>::const_iterator it = callstack.begin(); it != callstack.end(); ++it)
|
for (std::list<const Token *>::const_iterator it = callstack.begin(); it != callstack.end(); ++it)
|
||||||
{
|
{
|
||||||
|
// --errorlist can provide null values here
|
||||||
|
if (!(*it))
|
||||||
|
continue;
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorLogger::ErrorMessage::FileLocation loc;
|
||||||
loc.line = (*it)->linenr();
|
loc.line = (*it)->linenr();
|
||||||
loc.file = _tokenizer->file(*it);
|
loc.file = _tokenizer->file(*it);
|
||||||
|
|
Loading…
Reference in New Issue