*resource = This->screen->resource_create(This->screen, &tmplt);
*present_handle = D3DWindowBuffer_create(This, *resource, 24, true);
+
+ if (!*present_handle) {
+ pipe_resource_reference(resource, NULL);
+ }
}
static void
* mode. It may need a fix */
create_present_buffer(This, width, height, &temp_resource, &temp_handle);
+ if (!temp_resource || !temp_handle) {
+ return D3DERR_INVALIDCALL;
+ }
+
desc.Type = D3DRTYPE_SURFACE;
desc.Pool = D3DPOOL_DEFAULT;
desc.MultiSampleType = D3DMULTISAMPLE_NONE;