Handle proc == NULL in THUNK_SetDCHook correctly.

This commit is contained in:
Ulrich Weigand 1999-05-22 16:09:52 +00:00 committed by Alexandre Julliard
parent adfeec96dd
commit 733145f726
1 changed files with 3 additions and 1 deletions

View File

@ -535,7 +535,9 @@ BOOL16 WINAPI THUNK_SetDCHook( HDC16 hdc, FARPROC16 proc, DWORD dwHookData )
defDCHookProc = (FARPROC16)-1;
}
if (proc != defDCHookProc)
if (!proc)
thunk = NULL;
else if (proc != defDCHookProc)
{
thunk = THUNK_Alloc( proc, (RELAY)CallTo16_word_wwll );
if (!thunk) return FALSE;