* calling receive_data with NULL as first argument(thread_id)

failed on Haiku, this makes e.g. painting in ArtPaint work

  Don't know if this is the best place to fix it though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27322 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich 2008-09-04 16:07:11 +00:00
parent 3d2516cb5f
commit 754b706519
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,7 @@ _thread_do_exit_notification(void)
{
callback_node *node = tls_get(TLS_ON_EXIT_THREAD_SLOT);
callback_node *next;
while (node != NULL) {
next = node->next;
@ -179,6 +179,10 @@ send_data(thread_id thread, int32 code, const void *buffer, size_t bufferSize)
int32
receive_data(thread_id *_sender, void *buffer, size_t bufferSize)
{
if (_sender == NULL) {
thread_id id;
return _kern_receive_data(&id, buffer, bufferSize);
}
return _kern_receive_data(_sender, buffer, bufferSize);
}