commit 795535e44fde4cfbb678454838294530560d3686
Author: Vincent van Ravesteijn <v...@lyx.org>
Date:   Fri Feb 7 15:53:57 2014 +0100

    Do not try to track_change an auto-deleted bibitem
    
    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.

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index fb52239..7118ff6 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -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;
        }

Reply via email to