]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.cpp
forgot that
[lyx.git] / src / paragraph_funcs.cpp
index e59e4a5909ef05df2e6b0d6a512ed0a920a37c61..2881c49325adfc0dde489fdd4a0dcba16068ea0c 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -36,8 +36,9 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
        // Note: moveItem() does not honour change tracking!
        // Therefore, it should only be used for breaking and merging paragraphs
 
-       Font const & tmpFont = fromPar.getFontSettings(params, fromPos);
-       Change const & tmpChange = fromPar.lookupChange(fromPos);
+       // We need a copy here because the character at fromPos is going to be erased.
+       Font const tmpFont = fromPar.getFontSettings(params, fromPos);
+       Change const tmpChange = fromPar.lookupChange(fromPos);
 
        if (Inset * tmpInset = fromPar.getInset(fromPos)) {
                fromPar.releaseInset(fromPos);