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