]> git.lyx.org Git - lyx.git/commitdiff
Move assignment where needed
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 5 Jan 2021 23:22:09 +0000 (18:22 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 5 Jan 2021 23:22:09 +0000 (18:22 -0500)
src/mathed/InsetMathSpace.cpp

index d053b68d412ac67409327614595b2b4cedf2bdec..fcef36c1a1ca50eb829661e2ac099e66f8f063ed 100644 (file)
@@ -320,8 +320,8 @@ void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "mathspace") {
                        MathData ar;
-                       Buffer * buf = buffer_;
                        if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
+                               Buffer * buf = buffer_;
                                cur.recordUndo();
                                *this = *ar[0].nucleus()->asSpaceInset();
                                buffer_ = buf;