Fix bug #5968: Assertion while reading a document with multiple equation labels.

This is another ad-hoc solution for the problem of a zero buffer pointer while reading a document or when using cut&paste.

This simple solution would be suitable for branch.

see also e.g. r29085, r28319, bug #5688.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31861 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-11-05 00:38:09 +00:00
parent 5ea9cd8b91
commit d63403205b

View File

@ -507,9 +507,13 @@ void InsetMathHull::label(row_type row, docstring const & label)
label_[row] = dummy_pointer;
// We need an update of the Buffer reference cache.
// This is achieved by updateLabels().
if (buffer_)
buffer().updateLabels();
} else {
if (buffer_)
label_[row]->updateCommand(label);
else
label_[row]->setParam("name", label);
}
return;
}