Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS

Clamp the default value for the number of processors to use to the
maximum number of threads.
This commit is contained in:
Sven Neumann 2010-05-16 22:26:11 +02:00
parent 7de8fa5293
commit 00f0350413
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
num_processors = num_processors * 2;
#endif
num_processors = MIN (num_processors, GIMP_MAX_NUM_THREADS);
GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_NUM_PROCESSORS,
"num-processors", NUM_PROCESSORS_BLURB,
1, GIMP_MAX_NUM_THREADS, num_processors,