]> git.lyx.org Git - features.git/commitdiff
I forgot this in previous rev.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 12 Sep 2008 13:43:48 +0000 (13:43 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 12 Sep 2008 13:43:48 +0000 (13:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26371 a592a061-630c-0410-9148-cb99ea01b6c8

src/CutAndPaste.cpp

index 6652b2ef5b54548aa1af85426e010dba4ab58cc9..b31117d2802bd690b0cabbddb67734d7ea52d6ce 100644 (file)
@@ -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)) {