diff --git a/relay32/wowthunk.c b/relay32/wowthunk.c index 41760af02ee..c0e14414982 100644 --- a/relay32/wowthunk.c +++ b/relay32/wowthunk.c @@ -25,7 +25,7 @@ DEFAULT_DEBUG_CHANNEL(thunk) */ BOOL WINAPI WOWGetDescriptor( SEGPTR segptr, LPLDT_ENTRY ldtent ) { - return GetThreadSelectorEntry( GetCurrentThreadId(), + return GetThreadSelectorEntry( GetCurrentThread(), segptr >> 16, ldtent ); } @@ -345,8 +345,8 @@ static DWORD WOW_CallProc32W16( BOOL Ex ) argconvmask = VA_ARG16( valist, DWORD ); proc32 = VA_ARG16( valist, FARPROC ); TRACE("(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex); - args = (DWORD*)HEAP_xalloc( GetProcessHeap(), 0, - sizeof(DWORD)*nrofargs ); + args = (DWORD*)HeapAlloc( GetProcessHeap(), 0, sizeof(DWORD)*nrofargs ); + if(args == NULL) proc32 = NULL; /* maybe we should WARN here? */ /* CallProcEx doesn't need its args reversed */ for (i=0;i