]> git.lyx.org Git - features.git/blobdiff - src/Paragraph.cpp
DocBook: add a parameter to change the namespace prefix for MathML.
[features.git] / src / Paragraph.cpp
index 8ac87d31c2d2060cfa08f56d30d417a110c02023..6bf4ce386203fab7ccd5052c2270c1459672ca4c 100644 (file)
@@ -835,8 +835,9 @@ void Paragraph::Private::insertChar(pos_type pos, char_type c,
        speller_state_.increasePosAfterPos(pos);
 
        // Update bookmarks
-       theSession().bookmarks().adjustPosAfterPos(inset_owner_->buffer().fileName(),
-                                                  id_, pos, 1);
+       if (inset_owner_ && inset_owner_->isBufferValid())
+               theSession().bookmarks().adjustPosAfterPos(inset_owner_->buffer().fileName(),
+                                                      id_, pos, 1);
 }
 
 
@@ -922,8 +923,9 @@ bool Paragraph::eraseChar(pos_type pos, bool trackChanges)
        d->speller_state_.refreshLast(size());
 
        // Update bookmarks
-       theSession().bookmarks().adjustPosAfterPos(d->inset_owner_->buffer().fileName(),
-                                                  d->id_, pos, -1);
+       if (d->inset_owner_ && d->inset_owner_->isBufferValid())
+               theSession().bookmarks().adjustPosAfterPos(d->inset_owner_->buffer().fileName(),
+                                                      d->id_, pos, -1);
 
        return true;
 }