mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
* segfault fix when deleting the last element from the tree
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23239 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2e4848e082
commit
22d8e780f4
@ -2306,9 +2306,9 @@ private:
|
||||
|
||||
// if the last key of the leaf was changed, the parent is notified
|
||||
// and updates the key of this leaf
|
||||
if (slot == leaf->slotuse)
|
||||
if (slot == leaf->slotuse && parent)
|
||||
{
|
||||
if (parent && parentslot < parent->slotuse)
|
||||
if (parentslot < parent->slotuse)
|
||||
{
|
||||
BTREE_ASSERT(parent->childid[parentslot] == curr);
|
||||
parent->slotkey[parentslot] = leaf->slotkey[leaf->slotuse - 1];
|
||||
|
Loading…
Reference in New Issue
Block a user