From: Abdelrazak Younes Date: Fri, 12 Sep 2008 13:43:48 +0000 (+0000) Subject: I forgot this in previous rev. X-Git-Tag: 1.6.10~3487 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6cc68a2663d1b86f601e196f1ed34e9685a3f6c6;p=features.git I forgot this in previous rev. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26371 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 6652b2ef5b..b31117d280 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -115,9 +115,8 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist, // Convert newline to paragraph break in ERT inset. // This should not be here! - Inset * inset = pars[pit].inInset(); - if (inset && (inset->lyxCode() == ERT_CODE || - inset->lyxCode() == LISTINGS_CODE)) { + InsetCode const code = target_inset->lyxCode(); + if (code == ERT_CODE || code == LISTINGS_CODE) { for (size_t i = 0; i != insertion.size(); ++i) { for (pos_type j = 0; j != insertion[i].size(); ++j) { if (insertion[i].isNewline(j)) {