From f959be9c97a88971e1cf70284868afd6854e52eb Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 23 Oct 1999 19:47:55 +0000 Subject: [PATCH] Ignore wrong hInstance. --- loader/task.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loader/task.c b/loader/task.c index d3f90a5babe..07a6d87c402 100644 --- a/loader/task.c +++ b/loader/task.c @@ -929,6 +929,12 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance ) ERR_(task)("Ouch ! MakeProcInstance called with func == NULL !\n"); return (FARPROC16)0; /* Windows seems to do the same */ } + if ( GetTaskDS16() !=hInstance ) + { + ERR_(task)("Problem with hInstance? Got %04x, using %04x instead\n", + hInstance,GetTaskDS16()); + hInstance = GetTaskDS16(); + } if (!hInstance) hInstance = CURRENT_DS; thunkaddr = TASK_AllocThunk( GetCurrentTask() ); if (!thunkaddr) return (FARPROC16)0;