]> git.lyx.org Git - features.git/commitdiff
Do not try to track_change an auto-deleted bibitem
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 7 Feb 2014 14:53:57 +0000 (15:53 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 7 Feb 2014 21:55:05 +0000 (22:55 +0100)
We are not capable of handling two bibitems within one biblio paragraph.
That's why we have functions like Paragraph::brokenBiblio() and
Paragraph::fixBiblio(). So, if we fix the biblio by deleting the second
bibitem, we should not keep it as deleted.

This code caused a crash because the inset was released, but still kept as
deleted.

Fixes-bug: #8646.

src/Paragraph.cpp

index fb522391fbb7e9dd108a9a6ebd22d3cd9af5074b..7118ff6962e8b212274a7781bf1faa03101ba784 100644 (file)
@@ -3581,8 +3581,7 @@ int Paragraph::fixBiblio(Buffer const & buffer)
                // these, which there should be.
                // FIXME: why does it make sense to do that rather
                // than keep the first? (JMarc)
-               Inset * inset = d->insetlist_.release(bibitem_pos);
-               eraseChar(bibitem_pos, track_changes);
+               Inset * inset = releaseInset(bibitem_pos);
                d->insetlist_.begin()->inset = inset;
                return -bibitem_pos;
        }