* 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:
Michael Lotz 2008-09-13 15:55:15 +00:00
parent fccbe8f1a1
commit 3e8d3c5f98
1 changed files with 1 additions and 1 deletions

View File

@ -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;