WINED3D: Fix a possible null dereference.

David Adam david.adam.cnrs at
Fri Apr 18 20:41:14 CDT 2008

The Sting Demo calls the function IDirect3DDeviceImpl_7_SetMaterial (in
ddraw/device.c) with Mat=NULL.
Then, this makes the function IWineD3DDeviceImpl_SetMaterial (in
wined3d/device.c) crashes in the line  This->updateStateBlock->material =
So, the patch checks is the material is not null before  assignating it.

This fixes a crash in The Sting demo.

David Adam
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-for-a-possible-Null-pointer-dereference-in-IWi.patch
Type: application/octet-stream
Size: 1244 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list