]> git.sesse.net Git - vlc/commitdiff
Be lazy : let modules do what they want with stats - without crashing
authorRafaël Carré <funman@videolan.org>
Fri, 23 May 2008 15:06:51 +0000 (17:06 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 23 May 2008 15:07:43 +0000 (17:07 +0200)
src/misc/stats.c

index db058b2a8a03bf5e8ee7c3ed8acc6d24e7878042..1b05c11b24cbb4f8aa3c679097fbafa99fa13309 100644 (file)
@@ -32,8 +32,6 @@
 #include <vlc/vlc.h>
 #include <stdio.h>                                               /* required */
 
-#include <assert.h>
-
 #include "input/input_internal.h"
 
 /*****************************************************************************
@@ -378,7 +376,6 @@ void __stats_TimerDump( vlc_object_t *p_obj, unsigned int i_id )
             break;
         }
     }
-    assert( p_counter );
     TimerDump( p_obj, p_counter, true );
     vlc_mutex_unlock( &priv->timer_lock );
 }
@@ -584,7 +581,8 @@ static int CounterUpdate( vlc_object_t *p_handler,
 static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
                        bool b_total )
 {
-    assert( p_counter );
+    if( !p_counter )
+        return;
 
     mtime_t last, total;
     int i_total;