preprocessor: Don't access empty lists
libc aborts with: /usr/include/c++/4.4/debug/list:256:error: attempt to access an element in an empty container. Objects involved in the operation: sequence "this" @ 0x0xbfffe5f0 { type = NSt7__debug4listISsSaISsEEE; } otherwise.
This commit is contained in:
parent
de2c133f6a
commit
1e4288fe2e
|
@ -2131,7 +2131,7 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
// filename contains now a file name e.g. "menu.h"
|
||||
std::string processedFile;
|
||||
std::string filepath;
|
||||
if (headerType == UserHeader)
|
||||
if (headerType == UserHeader && !paths.empty())
|
||||
filepath = paths.back();
|
||||
std::ifstream fin;
|
||||
const bool fileOpened(openHeader(filename, includePaths, filepath, fin));
|
||||
|
|
Loading…
Reference in New Issue