]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.cpp
* Call metrics of the parameters with the correct font in MathMacros, for example
[lyx.git] / src / paragraph_funcs.cpp
index f77139156081f82af6eb40902e4e6612d74c9130..d8a7a858fb00945345ad0d055717b258cdb0bd2c 100644 (file)
@@ -42,7 +42,11 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
        if (Inset * tmpInset = fromPar.getInset(fromPos)) {
                fromPar.releaseInset(fromPos);
                // The inset is not in fromPar any more.
-               return toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange);
+               if (!toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange)) {
+                       delete tmpInset;
+                       return false;
+               }
+               return true;
        }
 
        char_type const tmpChar = fromPar.getChar(fromPos);