* If there is no handler, we must not try to remove it from the linked list.

* This fixes bug #1644 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24998 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-04-17 11:55:04 +00:00
parent e0da34f5c0
commit ef4a3227fa
1 changed files with 3 additions and 1 deletions

View File

@ -27,8 +27,10 @@ __pthread_cleanup_pop_handler(void)
return NULL; return NULL;
__pthread_cleanup_handler* handler = thread->cleanup_handlers; __pthread_cleanup_handler* handler = thread->cleanup_handlers;
thread->cleanup_handlers = handler->previous; if (handler == NULL)
return NULL;
thread->cleanup_handlers = handler->previous;
return handler; return handler;
} }