summaryrefslogtreecommitdiff
path: root/ace/Thread_Manager.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-05-08 17:04:12 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-05-08 17:04:12 +0000
commitce49af958c8b39d39a86a6efa851dcabeb31b489 (patch)
treeaf796e3b46ddbae1c1de959b41c289a4c42fe0f4 /ace/Thread_Manager.cpp
parent5dfc87f4054f105d2300a09b371b50da5aaacb42 (diff)
downloadATCD-ce49af958c8b39d39a86a6efa851dcabeb31b489.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Thread_Manager.cpp')
-rw-r--r--ace/Thread_Manager.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index e29f2fe96cd..92a552a801a 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -1082,7 +1082,11 @@ ACE_Thread_Manager::get_grp (ACE_thread_t t_id, int &grp_id)
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
ACE_FIND (this->find_thread (t_id), ptr);
- grp_id = ptr->grp_id_;
+
+ if (ptr)
+ grp_id = ptr->grp_id_;
+ else
+ return -1;
return 0;
}
@@ -1095,7 +1099,10 @@ ACE_Thread_Manager::set_grp (ACE_thread_t t_id, int grp_id)
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
ACE_FIND (this->find_thread (t_id), ptr);
- ptr->grp_id_ = grp_id;
+ if (ptr)
+ ptr->grp_id_ = grp_id;
+ else
+ return -1;
return 0;
}