Prevent iteration past end() for empty SysPath.

This commit is contained in:
Axel Naumann 2014-01-28 18:21:37 +01:00 committed by sftnight
parent 651219e6e4
commit 0b6d047bb3

View File

@ -146,8 +146,10 @@ namespace cling {
initialized = true;
}
std::vector<std::string>::const_iterator it = SysPaths.begin();
while ((++it) != SysPaths.end()) {
Paths.push_back((*it).c_str());
if (it != SysPaths.end()) {
while ((++it) != SysPaths.end()) {
Paths.push_back((*it).c_str());
}
}
#endif
}