Release children of a master if the children don't have a default master. It was already proven that the child is a child of the master, but the check the other way around failed when child->parent() was zero.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-08-16 00:19:27 +00:00
parent 5f877e218a
commit c0dac43600

View File

@ -318,7 +318,8 @@ bool BufferList::releaseChild(Buffer * parent, Buffer * child)
LASSERT(parent->isChild(child), return false); LASSERT(parent->isChild(child), return false);
// Child document has a different parent, don't close it. // Child document has a different parent, don't close it.
if (child->parent() != parent) Buffer const * parent_ = child->parent();
if (parent_ && parent_ != parent)
return false; return false;
BufferStorage::iterator it = bstore.begin(); BufferStorage::iterator it = bstore.begin();