From 5bd68605df90df02856ca69079682c9b911c1d2a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 23 Mar 2012 14:37:48 -0400 Subject: [PATCH] Backport fix for bug #8095. The crash was due to the otherwise innocent looking 07924ac300f68e. The cast Vincent replaced was already wrong---it seems to have been a thinko in 7bbd67eb2679---but it worked kind of by accident before. Now it crashes. --- src/insets/InsetLabel.cpp | 4 ++-- status.20x | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 7bff3d7c6e..c483f94883 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -113,8 +113,8 @@ void InsetLabel::updateReferences(docstring const & old_label, for (; it != end; ++it) { buffer().undo().recordUndo(it->second); if (it->first->lyxCode() == MATH_REF_CODE) { - InsetMathHull * mi = it->first->asInsetMath()->asHullInset(); - mi->asRefInset()->changeTarget(new_label); + InsetMathRef * mi = it->first->asInsetMath()->asRefInset(); + mi->changeTarget(new_label); } else { InsetCommand * ref = it->first->asInsetCommand(); ref->setParam("reference", new_label); diff --git a/status.20x b/status.20x index 6dca76a2f9..fa47388a53 100644 --- a/status.20x +++ b/status.20x @@ -74,6 +74,9 @@ What's new * USER INTERFACE +- Fixed crash when modifying equation label and there are references to that + label in math (bug 8095). + - Do not disable View/Update Other Formats button when "Use non-TeX fonts" is active (bug 8069). -- 2.39.5