]> git.lyx.org Git - lyx.git/commitdiff
Avoid asserting when reading the session file
authorEnrico Forestieri <forenr@lyx.org>
Sat, 2 Dec 2017 09:46:46 +0000 (10:46 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 2 Dec 2017 20:37:02 +0000 (21:37 +0100)
Fixes #10824.

(cherry picked from commit f84acc0e3441d09c0b5026f97c3e4cbbc0067256)

src/Session.cpp

index 009bf39cf1ed2bdbae82bbc76903cfa3665a6335..eb0fc64829f6a1226e82491284060490c30174bb 100644 (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