InsetMathHull::addToToc(): Work around buffer reference in InsetMathHull. This inset is created at too many places (see Parser::parse1() in MathParser.cpp).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23307 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-28 10:04:15 +00:00
parent d4cacf3642
commit e56e5e213c

View File

@ -196,6 +196,13 @@ InsetMathHull & InsetMathHull::operator=(InsetMathHull const & other)
void InsetMathHull::addToToc(ParConstIterator const & pit) const void InsetMathHull::addToToc(ParConstIterator const & pit) const
{ {
if (!buffer_) {
//FIXME: buffer_ should be set at creation for this inset! Problem is
// This inset is created at too many places (see Parser::parse1() in
// MathParser.cpp).
return;
}
vector<docstring> labels; vector<docstring> labels;
getLabelList(labels); getLabelList(labels);
if (labels.empty()) if (labels.empty())