From a9adbc73158e8f8b225cd59d62ad5ade648c8241 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 10 Oct 2010 16:31:08 +0200 Subject: Don't draw progress bar unless requested --- src/thread-pool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/thread-pool.c b/src/thread-pool.c index b27c0441..ac508b11 100644 --- a/src/thread-pool.c +++ b/src/thread-pool.c @@ -78,7 +78,9 @@ static void *worker_thread(void *pargsv) pthread_mutex_lock(&q->lock); q->status[mytask] = TASK_FINISHED; q->n_done++; - progress_bar(q->n_done, q->n_tasks, q->text); + if ( q->text != NULL ) { + progress_bar(q->n_done, q->n_tasks, q->text); + } pthread_mutex_unlock(&q->lock); } while ( 1 ); -- cgit v1.2.3