From: Vincent van Ravesteijn Date: Thu, 5 Nov 2009 00:38:09 +0000 (+0000) Subject: Fix bug #5968: Assertion while reading a document with multiple equation labels. X-Git-Tag: 2.0.0~5225 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d63403205b6f931c133776db52eb25206a2686e1;p=lyx.git 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 --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index abb35e479f..2d16cc20a1 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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(). - buffer().updateLabels(); + if (buffer_) + buffer().updateLabels(); } else { - label_[row]->updateCommand(label); + if (buffer_) + label_[row]->updateCommand(label); + else + label_[row]->setParam("name", label); } return; }