Fix invalid iterator in SurfaceInterfacePrivate::raiseChild()
The append method will invalidate the iterator, so we cannot call the erase() method with the old iterator.
This commit is contained in:
parent
89dc01ada8
commit
d740a45469
1 changed files with 1 additions and 1 deletions
|
@ -110,8 +110,8 @@ bool SurfaceInterfacePrivate::raiseChild(SubSurfaceInterface *subsurface, Surfac
|
||||||
}
|
}
|
||||||
if (sibling == q) {
|
if (sibling == q) {
|
||||||
// it's to the parent, so needs to become last item
|
// it's to the parent, so needs to become last item
|
||||||
pending.children.append(*it);
|
|
||||||
pending.children.erase(it);
|
pending.children.erase(it);
|
||||||
|
pending.children.append(subsurface);
|
||||||
pending.childrenChanged = true;
|
pending.childrenChanged = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue