Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
12dac70a
Commit
12dac70a
authored
Mar 05, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Handle errors from lcms more gracefully.
Default behavior of lcms is to abort the process when it encounters an error it considers fatal, such as a corrupt color profile.
parent
a7b70911
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
mscms_main.c
dlls/mscms/mscms_main.c
+20
-0
No files found.
dlls/mscms/mscms_main.c
View file @
12dac70a
...
@@ -36,6 +36,23 @@
...
@@ -36,6 +36,23 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mscms
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mscms
);
#ifdef HAVE_LCMS
static
int
lcms_error_handler
(
int
error
,
const
char
*
text
)
{
switch
(
error
)
{
case
LCMS_ERRC_WARNING
:
case
LCMS_ERRC_RECOVERABLE
:
case
LCMS_ERRC_ABORTED
:
WARN
(
"%d %s
\n
"
,
error
,
debugstr_a
(
text
));
return
1
;
default:
ERR
(
"unknown error %d %s
\n
"
,
error
,
debugstr_a
(
text
));
return
0
;
}
}
#endif
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
{
TRACE
(
"(%p, %d, %p)
\n
"
,
hinst
,
reason
,
reserved
);
TRACE
(
"(%p, %d, %p)
\n
"
,
hinst
,
reason
,
reserved
);
...
@@ -44,6 +61,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
...
@@ -44,6 +61,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinst
);
DisableThreadLibraryCalls
(
hinst
);
#ifdef HAVE_LCMS
cmsSetErrorHandler
(
lcms_error_handler
);
#endif
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
#ifdef HAVE_LCMS
#ifdef HAVE_LCMS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment