From: joncruz Date: Mon, 1 Oct 2007 16:14:50 +0000 (+0000) Subject: Added lcms error handler to avoid exiting upon CMS error X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=250bf4e094e57ad409bfb25c38e607a77ad1bbd4;p=inkscape.git Added lcms error handler to avoid exiting upon CMS error --- 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; }