Code

Added lcms error handler to avoid exiting upon CMS error
authorjoncruz <joncruz@users.sourceforge.net>
Mon, 1 Oct 2007 16:14:50 +0000 (16:14 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Mon, 1 Oct 2007 16:14:50 +0000 (16:14 +0000)
src/color-profile.cpp

index 03a975a0cac248d922a1acf4a3b683dd35cd5881..39cebcb0cbe69cf2341d606579bb7cd1291ca9b4 100644 (file)
@@ -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;
     }