1 |
diff -up ghostscript-9.07/base/gsicc_manage.c.icc-missing-check ghostscript-9.07/base/gsicc_manage.c |
2 |
--- ghostscript-9.07/base/gsicc_manage.c.icc-missing-check 2013-02-14 07:58:13.000000000 +0000 |
3 |
+++ ghostscript-9.07/base/gsicc_manage.c 2013-02-14 17:15:48.974654828 +0000 |
4 |
@@ -144,6 +144,8 @@ gsicc_set_iccsmaskprofile(const char *pn |
5 |
if (str != NULL) { |
6 |
icc_profile = gsicc_profile_new(str, mem, pname, namelen); |
7 |
code = sfclose(str); |
8 |
+ } |
9 |
+ if (str != NULL && icc_profile != NULL) { |
10 |
/* Get the profile handle */ |
11 |
icc_profile->profile_handle = |
12 |
gsicc_get_profile_handle_buffer(icc_profile->buffer, |
13 |
@@ -593,6 +595,8 @@ gsicc_set_srcgtag_struct(gsicc_manager_t |
14 |
icc_profile = |
15 |
gsicc_profile_new(str, mem, curr_ptr, strlen(curr_ptr)); |
16 |
code = sfclose(str); |
17 |
+ } |
18 |
+ if (str != NULL && icc_profile != NULL) { |
19 |
gsicc_init_profile_info(icc_profile); |
20 |
cmm = gsCMM_DEFAULT; |
21 |
/* Check if this object is a devicelink profile. |
22 |
@@ -1516,6 +1520,8 @@ gsicc_set_device_profile(gx_device * pde |
23 |
icc_profile = |
24 |
gsicc_profile_new(str, mem, file_name, strlen(file_name)); |
25 |
code = sfclose(str); |
26 |
+ } |
27 |
+ if (str != NULL && icc_profile != NULL) { |
28 |
if (pro_enum < gsPROOFPROFILE) { |
29 |
if_debug1m(gs_debug_flag_icc, mem, |
30 |
"[icc] Setting device profile %d\n", pro_enum); |