From: Richard Heck Date: Wed, 3 Oct 2007 02:39:11 +0000 (+0000) Subject: Fix bug 4232: Crash on bad counter name. X-Git-Tag: 1.6.10~8064 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9b223c494ed67f5d9a477a2e05cfe381fd7f9361;p=lyx.git Fix bug 4232: Crash on bad counter name. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20679 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 8a7d8a244e..67ca915d10 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1658,7 +1658,9 @@ docstring Paragraph::expandLabel(LayoutPtr const & layout, size_t const j = fmt.find('@', i + 1); if (j != docstring::npos) { docstring parent(fmt, i + 1, j - i - 1); - docstring label = expandLabel(tclass[parent], bparams, + docstring label = from_ascii("XXXX"); + if (tclass.hasLayout(parent)) + docstring label = expandLabel(tclass[parent], bparams, process_appendix); fmt = docstring(fmt, 0, i) + label + docstring(fmt, j + 1, docstring::npos);