This prevents dangling pointers that might crash LyX.
Fixes: #9979.
BufferStorage::iterator const it =
find(bstore.begin(), bstore.end(), buf);
if (it != bstore.end()) {
+ Buffer const * parent = buf ? buf->parent() : 0;
Buffer * tmp = (*it);
bstore.erase(it);
LASSERT(tmp, return);
delete tmp;
+ if (parent)
+ // If this was a child, update the parent's buffer
+ // to avoid crashes due to dangling pointers (bug 9979)
+ parent->updateBuffer();
}
}
- Fix crash when closing master file with full view source open (bug 10560).
+- Fix crash when closing master document with dirty child while Document
+ Settings dialog is open (bug 9979).
+
- Remove duplicate entries from the Symbols dialog (bug 10644).
- Always show the float type in the float inset label (bug 10618).