On 19/04/2008, David Adam david.adam.cnrs@gmail.com wrote:
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 = *pMaterial; So, the patch checks is the material is not null before assignating it.
This fixes a crash in The Sting demo.
David Adam
I would like to see a few tests that prove this is the correct behaviour (instead of eg. simply returning WINED3DERR_INVALIDCALL), for ddraw, d3d8 and d3d9.