d3d8: Make Direct3DCreate8 fail if we can't initialize wined3d.

This commit is contained in:
Alexandre Julliard 2008-06-24 11:07:43 +02:00
parent aba003de4e
commit 360d87f420
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,11 @@ IDirect3D8* WINAPI Direct3DCreate8(UINT SDKVersion) {
TRACE("Created Direct3D object @ %p, WineObj @ %p\n", object, object->WineD3D);
LeaveCriticalSection(&d3d8_cs);
if (!object->WineD3D)
{
HeapFree( GetProcessHeap(), 0, object );
object = NULL;
}
return (IDirect3D8*) object;
}