From e06afa53f7b7ad64c2c51ecb0eeafcd4099a1292 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 8 Oct 2010 18:52:40 +0200 Subject: facetron: Handle nthreads > n_total_patterns --- src/facetron.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/facetron.c b/src/facetron.c index bd7f58ed..6c04835a 100644 --- a/src/facetron.c +++ b/src/facetron.c @@ -240,6 +240,8 @@ static void munch_threads(struct image *images, int n_total_patterns, struct process_args *pargs; int r; + if ( n_started == n_total_patterns ) break; + pargs = worker_args[i]; pargs->image = &images[n_started++]; -- cgit v1.2.3