preprocessor: a segmentation fault fix. Check if tokens is null.

This commit is contained in:
Daniel Marjamäki 2009-01-14 17:22:11 +00:00
parent a196ea1c2c
commit b9460ca6f8
1 changed files with 2 additions and 0 deletions

View File

@ -475,6 +475,8 @@ std::string Preprocessor::expandMacros(std::string code)
Tokenizer tokenizer;
std::istringstream istr(macro.c_str());
tokenizer.tokenize(istr, "");
if (! tokenizer.tokens())
continue;
// Extract macro parameters
std::vector<std::string> macroparams;