]> git.lyx.org Git - features.git/commitdiff
Fix bug #8095.
authorRichard Heck <rgheck@lyx.org>
Fri, 23 Mar 2012 18:37:48 +0000 (14:37 -0400)
committerRichard Heck <rgheck@lyx.org>
Fri, 23 Mar 2012 18:37:48 +0000 (14:37 -0400)
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

index 7bff3d7c6e82ba722223127cf44e9a1083709cfc..c483f9488374731b21e4bf4e36c0bd1590290011 100644 (file)
@@ -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);