]> git.sesse.net Git - vlc/commitdiff
vlc_threads.h: now that vlc_object_t is optional for mutexes, make sure that we deal...
authorDamien Fouilleul <damienf@videolan.org>
Tue, 22 Jan 2008 19:03:20 +0000 (19:03 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Tue, 22 Jan 2008 19:03:20 +0000 (19:03 +0000)
include/vlc_threads_funcs.h

index 696b39f758c1c5775ea64c9c1e053d28d52d6b80..b1e0f45e2dfe15874317b9c45dde27a151d84ffc 100644 (file)
@@ -142,7 +142,7 @@ static inline int __vlc_mutex_lock( const char * psz_file, int i_line,
 
 #endif
 
-    if( i_result )
+    if( i_result && p_mutex->p_this )
     {
         msg_Err( p_mutex->p_this,
                  "thread %li: mutex_lock failed at %s:%d (%d:%m)",
@@ -209,7 +209,7 @@ static inline int __vlc_mutex_unlock( const char * psz_file, int i_line,
 
 #endif
 
-    if( i_result )
+    if( i_result && p_mutex->p_this )
     {
         msg_Err( p_mutex->p_this,
                  "thread %li: mutex_unlock failed at %s:%d (%d:%m)",