From 3e8d3c5f9869cab1ec08123fd238b5b2acc575ed Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 13 Sep 2008 15:55:15 +0000 Subject: [PATCH] * 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 --- src/servers/app/View.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/app/View.cpp b/src/servers/app/View.cpp index 4a2a0837cc..e6092fa62d 100644 --- a/src/servers/app/View.cpp +++ b/src/servers/app/View.cpp @@ -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;