summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2007-10-01 16:14:50 +0000
committerjoncruz <joncruz@users.sourceforge.net>2007-10-01 16:14:50 +0000
commit251334c3aea1b3af19dd5695b45a91837faed9c7 (patch)
tree20bce9cf0f217a258097b6c66ee3396ad87905bb /src/color-profile.cpp
parentAdded searching for icc profiles in standard locations, and preference to com... (diff)
downloadinkscape-251334c3aea1b3af19dd5695b45a91837faed9c7.tar.gz
inkscape-251334c3aea1b3af19dd5695b45a91837faed9c7.zip
Added lcms error handler to avoid exiting upon CMS error
(bzr r3820)
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 03a975a0c..39cebcb0c 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -483,6 +483,11 @@ static void findThings() {
}
}
+int errorHandlerCB(int ErrorCode, const char *ErrorText)
+{
+ g_message("lcms: Error %d; %s", ErrorCode, ErrorText);
+}
+
cmsHPROFILE Inkscape::colorprofile_get_system_profile_handle()
{
@@ -491,6 +496,8 @@ cmsHPROFILE Inkscape::colorprofile_get_system_profile_handle()
static bool init = false;
if ( !init ) {
+ cmsSetErrorHandler(errorHandlerCB);
+
findThings();
init = true;
}