mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
Fixed a threading issue. Thanks to Lachlan O'Dea <lodea@me.com> for pointing it out!
This commit is contained in:
@@ -218,6 +218,7 @@ public final class ColorSpaces {
|
||||
|
||||
switch (colorSpace) {
|
||||
case CS_ADOBE_RGB_1998:
|
||||
synchronized (ColorSpaces.class) {
|
||||
profile = adobeRGB1998.get();
|
||||
|
||||
if (profile == null) {
|
||||
@@ -237,10 +238,12 @@ public final class ColorSpaces {
|
||||
|
||||
adobeRGB1998 = new WeakReference<ICC_Profile>(profile);
|
||||
}
|
||||
}
|
||||
|
||||
return createColorSpace(profile);
|
||||
|
||||
case CS_GENERIC_CMYK:
|
||||
synchronized (ColorSpaces.class) {
|
||||
profile = genericCMYK.get();
|
||||
|
||||
if (profile == null) {
|
||||
@@ -258,6 +261,7 @@ public final class ColorSpaces {
|
||||
|
||||
genericCMYK = new WeakReference<ICC_Profile>(profile);
|
||||
}
|
||||
}
|
||||
|
||||
return createColorSpace(profile);
|
||||
|
||||
|
Reference in New Issue
Block a user