team::parent is NULL in case of the kernel - Expander crashed reliably

when expanding something with it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24047 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-02-21 16:15:00 +00:00
parent 0db772c937
commit 8327c8091f
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007, Axel Dörfler, [email protected].
* Copyright 2002-2008, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
@@ -1774,7 +1774,8 @@ update_orphaned_process_group(process_group* group, pid_t dyingProcess)
struct team* team = group->teams;
while (team != NULL) {
struct team* parent = team->parent;
if (team->id != dyingProcess && parent->id != dyingProcess
if (team->id != dyingProcess && parent != NULL
&& parent->id != dyingProcess
&& parent->group_id != group->id
&& parent->session_id == group->session->id) {
return false;