From a776656636c5d844c02f7ba34f9440fe8f866bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 2 Feb 2009 13:37:36 +0000 Subject: [PATCH] * InsetMathHull (numbered): - prevent NULL pointer (bug 5688). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28320 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index cb1d457656..274e461f11 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -530,6 +530,11 @@ void InsetMathHull::numbered(row_type row, bool num) label_[row] = 0; // We need an update of the Buffer reference cache. // This is achieved by updateLabels(). + if (!buffer_) { + // The buffer is set at the end of readInset + // when parsing the inset, buffer_ is 0. + return; + } lyx::updateLabels(buffer()); } }