Avoid asserting when reading the session file

Fixes #10824.
This commit is contained in:
Enrico Forestieri 2017-12-02 10:46:46 +01:00
parent b68701c4da
commit f84acc0e34

View File

@ -507,8 +507,7 @@ void ShellEscapeSection::read(istream & is)
if (c == '[')
break;
getline(is, s);
c = s[0];
if (c == 0 || c == '#' || c == ' ' || !FileName::isAbsolute(s))
if (s.empty() || s[0] == '#' || s[0] == ' ' || !FileName::isAbsolute(s))
continue;
// read shellescape files