Fixed a threading issue. Thanks to Lachlan O'Dea <lodea@me.com> for pointing it out!

This commit is contained in:
Harald Kuhr 2012-02-13 15:02:08 +01:00
parent ff3d578806
commit 897da0ebca

View File

@ -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);