* CID 1090: Check the view pointer for NULL before dereferencing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27484 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fccbe8f1a1
commit
3e8d3c5f98
|
@ -249,7 +249,7 @@ View::AddChild(View* view)
|
|||
bool
|
||||
View::RemoveChild(View* view)
|
||||
{
|
||||
if (view->fParent != this) {
|
||||
if (view == NULL || view->fParent != this) {
|
||||
printf("View::RemoveChild(%p - %s) - View is not child of "
|
||||
"this (%p) view!\n", view, view ? view->Name() : NULL, this);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue