fix cut and paste crash

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9594 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-02-07 10:01:43 +00:00
parent 6383254672
commit ccd660f0b1
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-02-07 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* CutAndPaste.C (pasteSelectionHelper): fix a crash
2005-02-03 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* buffer.C: format up to 241.

View File

@ -116,7 +116,8 @@ pasteSelectionHelper(Buffer const & buffer, ParagraphList & pars,
// Convert newline to paragraph break in ERT inset.
// This should not be here!
if (pars[pit].inInset()->lyxCode() == InsetBase::ERT_CODE) {
if (pars[pit].inInset() &&
pars[pit].inInset()->lyxCode() == InsetBase::ERT_CODE) {
for (ParagraphList::size_type i = 0; i < insertion.size(); ++i) {
for (pos_type j = 0; j < insertion[i].size(); ++j) {
if (insertion[i].isNewline(j)) {