diff --git a/src/xpdev/link_list.c b/src/xpdev/link_list.c index 6680b4b2ae57f08cf285fc3e738c9e5271217315..d0f2d8acbccb9ae98f4abe69c60ede11a0abaada 100644 --- a/src/xpdev/link_list.c +++ b/src/xpdev/link_list.c @@ -239,7 +239,7 @@ BOOL DLLCALL listLock(link_list_t* list) if(list==NULL) return(FALSE); #if defined(LINK_LIST_THREADSAFE) - if((ret=pthread_mutex_lock(&list->mutex))==0) + if((list->flags&LINK_LIST_MUTEX) && (ret=pthread_mutex_lock(&list->mutex))==0) #endif list->locks++; return(ret); @@ -259,7 +259,7 @@ BOOL DLLCALL listUnlock(link_list_t* list) if(list==NULL) return(FALSE); #if defined(LINK_LIST_THREADSAFE) - if((ret=pthread_mutex_unlock(&list->mutex))==0) + if((list->flags&LINK_LIST_MUTEX) && (ret=pthread_mutex_unlock(&list->mutex))==0) #endif list->locks--; return(ret);