eog r4561 - in branches/gnome-2-22: . src
- From: friemann svn gnome org
- To: svn-commits-list gnome org
- Subject: eog r4561 - in branches/gnome-2-22: . src
- Date: Sun, 4 May 2008 11:37:27 +0100 (BST)
Author: friemann
Date: Sun May 4 10:37:27 2008
New Revision: 4561
URL: http://svn.gnome.org/viewvc/eog?rev=4561&view=rev
Log:
2008-05-04 Felix Riemann <friemann svn gnome org>
* src/eog-window.c: (eog_window_get_display_profile):
Don't let lcms abort EOG if it encounters an error while trying to
load the display profile. Fixes bug #531300.
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/src/eog-window.c
Modified: branches/gnome-2-22/src/eog-window.c
==============================================================================
--- branches/gnome-2-22/src/eog-window.c (original)
+++ branches/gnome-2-22/src/eog-window.c Sun May 4 10:37:27 2008
@@ -595,6 +595,7 @@
int result;
cmsHPROFILE *profile;
char *atom_name;
+ int lcms_error_action;
dpy = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
@@ -640,7 +641,24 @@
XFree (str);
return NULL;
}
+
+ /* Make lcms errors non-fatal here, as it is possible
+ * to load invalid profiles with XICC.
+ * We don't want lcms to abort EOG in that case.
+ */
+ lcms_error_action = cmsErrorAction (LCMS_ERROR_IGNORE);
+
profile = cmsOpenProfileFromMem (str, length);
+
+ // Restore the previous error setting
+ cmsErrorAction (lcms_error_action);
+
+ if (G_UNLIKELY (profile == NULL)) {
+ eog_debug_message (DEBUG_LCMS,
+ "Invalid display profile, "
+ "not correcting");
+ }
+
XFree (str);
} else {
profile = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]