Blame SOURCES/ghostscript-icc-missing-check.patch

ea5d11
diff -up ghostscript-9.07/base/gsicc_manage.c.icc-missing-check ghostscript-9.07/base/gsicc_manage.c
ea5d11
--- ghostscript-9.07/base/gsicc_manage.c.icc-missing-check	2013-02-14 07:58:13.000000000 +0000
ea5d11
+++ ghostscript-9.07/base/gsicc_manage.c	2013-02-14 17:15:48.974654828 +0000
ea5d11
@@ -144,6 +144,8 @@ gsicc_set_iccsmaskprofile(const char *pn
ea5d11
     if (str != NULL) {
ea5d11
         icc_profile = gsicc_profile_new(str, mem, pname, namelen);
ea5d11
         code = sfclose(str);
ea5d11
+    }
ea5d11
+    if (str != NULL && icc_profile != NULL) {
ea5d11
         /* Get the profile handle */
ea5d11
         icc_profile->profile_handle =
ea5d11
             gsicc_get_profile_handle_buffer(icc_profile->buffer,
ea5d11
@@ -593,6 +595,8 @@ gsicc_set_srcgtag_struct(gsicc_manager_t
ea5d11
                             icc_profile =
ea5d11
                                 gsicc_profile_new(str, mem, curr_ptr, strlen(curr_ptr));
ea5d11
                             code = sfclose(str);
ea5d11
+                        }
ea5d11
+                        if (str != NULL && icc_profile != NULL) {
ea5d11
                             gsicc_init_profile_info(icc_profile);
ea5d11
                             cmm = gsCMM_DEFAULT;
ea5d11
                             /* Check if this object is a devicelink profile. 
ea5d11
@@ -1516,6 +1520,8 @@ gsicc_set_device_profile(gx_device * pde
ea5d11
             icc_profile =
ea5d11
                 gsicc_profile_new(str, mem, file_name, strlen(file_name));
ea5d11
             code = sfclose(str);
ea5d11
+        }
ea5d11
+        if (str != NULL && icc_profile != NULL) {
ea5d11
             if (pro_enum < gsPROOFPROFILE) {
ea5d11
                 if_debug1m(gs_debug_flag_icc, mem,
ea5d11
                            "[icc] Setting device profile %d\n", pro_enum);