From 3452f4fc9698f838279a45fc41aca6e0c9b0bcc3 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Mon, 25 Mar 2024 11:39:51 -0400 Subject: [PATCH] nemo-thumbnails.c: Always have at least 1 thumbnail thread. On a system with a single core, max_threads would evaluate to 0, and no thumbnailing would take place. --- libnemo-private/nemo-thumbnails.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnemo-private/nemo-thumbnails.c b/libnemo-private/nemo-thumbnails.c index 26154da49..a1bc26205 100644 --- a/libnemo-private/nemo-thumbnails.c +++ b/libnemo-private/nemo-thumbnails.c @@ -143,7 +143,7 @@ get_max_threads (void) { max_threads = pref; } - max_threads = CLAMP (max_threads, 1, (num_processors / 2)); + max_threads = CLAMP (max_threads, 1, MAX ((num_processors / 2), 1)); #if DEBUG_THREADS g_message ("Thumbnailer threads: %d (setting: %d, system count: %d)", max_threads, pref, num_processors);