testclangimport.cpp: fixed potential nullptr dereference in parse() (#2927)
This commit is contained in:
parent
8a1c16a560
commit
c846c0fbdc
|
@ -127,6 +127,9 @@ private:
|
|||
Tokenizer tokenizer(&settings, this);
|
||||
std::istringstream istr(clang);
|
||||
clangimport::parseClangAstDump(&tokenizer, istr);
|
||||
if (!tokenizer.tokens()) {
|
||||
return std::string();
|
||||
}
|
||||
return tokenizer.tokens()->stringifyList(true, false, false, false, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue