From 250bf4e094e57ad409bfb25c38e607a77ad1bbd4 Mon Sep 17 00:00:00 2001 From: joncruz Date: Mon, 1 Oct 2007 16:14:50 +0000 Subject: [PATCH] Added lcms error handler to avoid exiting upon CMS error --- src/color-profile.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- 2.30.2