mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fix memory leak.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a397cc81c2
commit
fefd99e836
@ -350,8 +350,10 @@ Buffer::~Buffer()
|
|||||||
Impl::BufferPositionMap::iterator end = d->children_positions.end();
|
Impl::BufferPositionMap::iterator end = d->children_positions.end();
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
Buffer * child = const_cast<Buffer *>(it->first);
|
Buffer * child = const_cast<Buffer *>(it->first);
|
||||||
|
if (d->cloned_buffer_)
|
||||||
|
delete child;
|
||||||
// The child buffer might have been closed already.
|
// The child buffer might have been closed already.
|
||||||
if (theBufferList().isLoaded(child))
|
else if (theBufferList().isLoaded(child))
|
||||||
theBufferList().releaseChild(this, child);
|
theBufferList().releaseChild(this, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user