mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
the right fix for the invalid iterators (plural)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3567 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d0a3af12d9
commit
51b32d4984
@ -191,8 +191,13 @@ bool BufferView::removeAutoInsets()
|
||||
if (pit->autoDelete()) {
|
||||
removed = true;
|
||||
pos_type const pos = pit.getPos();
|
||||
|
||||
|
||||
par->erase(pos);
|
||||
// get the next valid iterator position
|
||||
pit = par->InsetIterator(pos);
|
||||
// ensure we have a valid end iterator
|
||||
pend = par->inset_iterator_end();
|
||||
|
||||
if (cur_par == par) {
|
||||
if (cur_pos > pos)
|
||||
--cur_pos;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-02-19 Allan Rae <rae@lyx.org>
|
||||
|
||||
* BufferView2.C (removeAutoInsets): fix remaining freed memory read.
|
||||
Iterators might be simple to use but they also get invalidated.
|
||||
|
||||
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* Chktex.C:
|
||||
|
Loading…
Reference in New Issue
Block a user