BView: Don't allow a view to add itself as a child.

This commit is contained in:
Stephan Aßmus
2014-01-12 22:06:35 +01:00
parent 6a2493e4a6
commit 5c3fd4605e
+5
View File
@@ -3935,6 +3935,11 @@ BView::_AddChild(BView* child, BView* before)
return false;
}
if (child == this) {
debugger("AddChild failed - cannot add a view to itself.");
return false;
}
bool lockedOwner = false;
if (fOwner && !fOwner->IsLocked()) {
fOwner->Lock();