* src/frontend/controllers/frontend_helpers.cpp: safety fix suggested by Andre

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19004 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-07-07 11:19:39 +00:00
parent 252ec84acd
commit 98b921c75c

View File

@ -191,7 +191,7 @@ docstring const familyName(docstring const & name)
if (idx != docstring::npos)
return ltrim(fname.substr(0, idx));
idx = fname.rfind('.');
if (idx != docstring::npos && idx < fname.size() - 1)
if (idx != docstring::npos && idx + 1 < fname.size())
fname = ltrim(fname.substr(idx + 1));
// test if we have a LaTeX Space in front
if (fname[0] == '\\')