diff --git a/src/stats.c b/src/stats.c index 54408123..393d614f 100644 --- a/src/stats.c +++ b/src/stats.c @@ -84,6 +84,9 @@ void stats_shutdown() { int n; + if(!_stats_running) /* We can't shutdown if we're not running. */ + return; + /* wait for thread to exit */ _stats_running = 0; thread_join(_stats_thread_id);