Fixed a possible crashing bug.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9847 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-08 11:17:06 +00:00
parent 8bce4da9ee
commit bcf9ffef0b

View File

@ -238,10 +238,10 @@ vm_get_current_user_aspace_id(void)
{
struct thread *thread = thread_get_current_thread();
if (thread)
if (thread != NULL && thread->team->aspace != NULL)
return thread->team->aspace->id;
return -1;
return B_ERROR;
}