* 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:
@@ -249,7 +249,7 @@ View::AddChild(View* view)
|
|||||||
bool
|
bool
|
||||||
View::RemoveChild(View* view)
|
View::RemoveChild(View* view)
|
||||||
{
|
{
|
||||||
if (view->fParent != this) {
|
if (view == NULL || view->fParent != this) {
|
||||||
printf("View::RemoveChild(%p - %s) - View is not child of "
|
printf("View::RemoveChild(%p - %s) - View is not child of "
|
||||||
"this (%p) view!\n", view, view ? view->Name() : NULL, this);
|
"this (%p) view!\n", view, view ? view->Name() : NULL, this);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user