Fix crash reported by Enrico. Thinko or something in r35856.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36317 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-16 18:26:21 +00:00
parent 1aa5a0d1f1
commit b8d207901b

View File

@ -158,8 +158,7 @@ void InsetLabel::addToToc(DocIterator const & cpit)
DocIterator const ref_pit(it->second);
if (it->first->lyxCode() == MATH_REF_CODE)
toc.push_back(TocItem(ref_pit, 1,
it->first->asInsetMath()->asHullInset()->asRefInset()
->screenLabel()));
it->first->asInsetMath()->asRefInset()->screenLabel()));
else
toc.push_back(TocItem(ref_pit, 1,
static_cast<InsetRef *>(it->first)->screenLabel()));