* src/frontends/controllers/frontend_helpers.cpp Family name):

- don't try to trim after a dot that is the last character in the name
	  (fixes crash, bug 3981)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18992 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-07-05 16:11:44 +00:00
parent 7562340249
commit c6f4e95d55

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)
if (idx != docstring::npos && idx < fname.size() - 1)
fname = ltrim(fname.substr(idx + 1));
// test if we have a LaTeX Space in front
if (fname[0] == '\\')