1 |
diff -up ghostscript-9.05/base/gsicc_manage.c.icc-missing-check ghostscript-9.05/base/gsicc_manage.c |
2 |
--- ghostscript-9.05/base/gsicc_manage.c.icc-missing-check 2012-02-08 08:48:48.000000000 +0000 |
3 |
+++ ghostscript-9.05/base/gsicc_manage.c 2012-04-04 12:39:29.151888287 +0100 |
4 |
@@ -140,6 +140,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 |
@@ -517,6 +519,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 |
break; |
21 |
} else { |
22 |
@@ -1127,6 +1131,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_debug1(gs_debug_flag_icc, "[icc] Setting device profile %d\n", pro_enum); |
30 |
pdev->icc_struct->device_profile[pro_enum] = icc_profile; |