# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1300139008 0 # Node ID f190b5c2ce162861e3400da1b4469fde138eb3d0 # Parent ecf47778caff975db2ea11b714ea2564ad1783f0 Fixed 2 errors in the tree select event handler. Also removed unused experimental code. diff -r ecf47778caff -r f190b5c2ce16 mac/dw.m --- a/mac/dw.m Mon Mar 14 19:30:36 2011 +0000 +++ b/mac/dw.m Mon Mar 14 21:43:28 2011 +0000 @@ -279,8 +279,7 @@ item = (id)event; NSString *nstr = [item pointerAtIndex:1]; - user = [item pointerAtIndex:3]; - if(user) + if(nstr) { text = strdup([nstr UTF8String]); } @@ -288,6 +287,7 @@ { text = NULL; } + user = [item pointerAtIndex:2]; int result = treeselectfunc(handler->window, item, text, handler->data, user); if(text) { @@ -6755,12 +6755,7 @@ HMTX dw_mutex_new(void) { HMTX mutex = malloc(sizeof(pthread_mutex_t)); -#if 0 - pthread_mutexattr_t attr; - - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(mutex, &attr); -#endif + pthread_mutex_init(mutex, NULL); return mutex; }