From: Enrico Forestieri Date: Sat, 2 Dec 2017 09:46:46 +0000 (+0100) Subject: Avoid asserting when reading the session file X-Git-Tag: lyx-2.4.0dev-acb2ca7b~4284 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f84acc0e3441d09c0b5026f97c3e4cbbc0067256;p=lyx.git Avoid asserting when reading the session file Fixes #10824. --- diff --git a/src/Session.cpp b/src/Session.cpp index 009bf39cf1..eb0fc64829 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -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