Don't crash on failing DRIVER_FindFromHDrvr

Uwe Bonnes bon at
Mon Jun 7 07:28:43 CDT 2004


I sent a patch to prevent wine from crashing last friday. It happend, when
DRIVER_FindFromHDrvr returned NULL. No I found out, that I had sent that
patch before last year. Eric answered 
> this doesn't seem right to me: either the loading fails and we shouldn't 
> get a valid handle, or it succeeds and we should be able to find it
> there's must be something wrong elsewhere
> could you please send a -debugmsg +driver,+module,+winmm to see what 
> happens ?

and like before, I can't reproduce the error after reverting the patch:

> the error no longer exists. I guess some registry entry was corrupt and a
> successfull  run corrected it later.
> However I see a lot of check after  DRIVER_FindFromHDrvr() in other parts of
> the code... 

If one dose "grep -3 DRIVER_FindFromHDrvr wine/dlls/winmm/*", every other
usage of DRIVER_FindFromHDrvr is like if 
((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL)  

Why should expecting a NULL return be wrong? It  happens, as the the crashes

Uwe Bonnes                bon at

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

More information about the wine-devel mailing list