A view shouldn't be able to RemoveChild a view that it isn't in fact the parent of.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25835 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c9ca11bf43
commit
fed7414a59
@ -3488,6 +3488,9 @@ BView::RemoveChild(BView *child)
|
||||
if (!child)
|
||||
return false;
|
||||
|
||||
if (child->fParent != this)
|
||||
return false;
|
||||
|
||||
return child->RemoveSelf();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user