]> git.lyx.org Git - features.git/commitdiff
* one coercion is enough
authorStefan Schimanski <sts@lyx.org>
Thu, 1 Nov 2007 14:45:14 +0000 (14:45 +0000)
committerStefan Schimanski <sts@lyx.org>
Thu, 1 Nov 2007 14:45:14 +0000 (14:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21335 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp

index 3fa8a4af07bf60705db16df32cf607fe25c29271..2d8f777c6da1d692c625fd7a2c63908290ba0559 100644 (file)
@@ -945,10 +945,10 @@ bool Cursor::macroModeClose()
        if (in && in->interpretString(*this, s))
                return true;
        MathAtom atom = createInsetMath(name);
-       if (atom.nucleus()->asMacro()) {
+       MathMacro * atomAsMacro = atom.nucleus()->asMacro();
+       if (atomAsMacro) {
                // make non-greedy, i.e. don't eat parameters from the right
-               MathMacro * macro = atom.nucleus()->asMacro();
-               macro->setDisplayMode(MathMacro::DISPLAY_NONGREEDY_INIT);
+               atomAsMacro->setDisplayMode(MathMacro::DISPLAY_NONGREEDY_INIT);
        }
        plainInsert(atom);
        return true;