Commit 7b5fcc72 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Fixed behaviour of Alloc..ThunkletCallback[Ex] for NULL target.

parent 2bb2d9b0
......@@ -1380,6 +1380,8 @@ FARPROC WINAPI AllocLSThunkletCallbackEx16( SEGPTR target,
DWORD relay, HTASK16 task )
{
THUNKLET *thunk = (THUNKLET *)PTR_SEG_TO_LIN( target );
if ( !thunk ) return NULL;
if ( IsSLThunklet16( thunk ) && thunk->relay == relay
&& thunk->glue == (DWORD)ThunkletCallbackGlueSL )
return (FARPROC)thunk->target;
......@@ -1395,6 +1397,8 @@ SEGPTR WINAPI AllocSLThunkletCallbackEx16( FARPROC target,
DWORD relay, HTASK16 task )
{
THUNKLET *thunk = (THUNKLET *)target;
if ( !thunk ) return 0;
if ( IsLSThunklet( thunk ) && thunk->relay == relay
&& thunk->glue == (DWORD)ThunkletCallbackGlueLS - (DWORD)&thunk->type )
return (SEGPTR)thunk->target;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment