]> git.sesse.net Git - vlc/blobdiff - src/misc/stats.c
threads: Make sure we don't re-create a thread if the object has already one.
[vlc] / src / misc / stats.c
index 45ff1ce76eedd9f7dc80f3cc6d8f150205770c4a..db0d13d6609bc6c530db9c4978e79f96a3c2aaa2 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <stdio.h>                                               /* required */
 
 #include "input/input_internal.h"
@@ -581,9 +581,12 @@ static int CounterUpdate( vlc_object_t *p_handler,
 static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
                        bool b_total )
 {
+    if( !p_counter )
+        return;
+
     mtime_t last, total;
     int i_total;
-    if( !p_counter || p_counter->i_samples != 2 )
+    if( p_counter->i_samples != 2 )
     {
         msg_Err( p_obj, "timer %s does not exist", p_counter->psz_name );
         return;