diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index d1693c4cd0f..ec77a37fe61 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -707,7 +707,10 @@ static HRESULT WINAPI ID3DXMeshImpl_CloneMesh(ID3DXMesh *iface, DWORD options, C same_declaration = declaration_equals(declaration, orig_declaration); if (options & D3DXMESH_VB_SHARE) { - if (!same_declaration) goto error; + if (!same_declaration) { + hr = D3DERR_INVALIDCALL; + goto error; + } IDirect3DVertexBuffer9_AddRef(This->vertex_buffer); /* FIXME: refactor to avoid creating a new vertex buffer */ IDirect3DVertexBuffer9_Release(cloned_this->vertex_buffer); diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 838e40648f7..50e0e6bb038 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -9916,9 +9916,9 @@ static void test_clone_mesh(void) hr = mesh->lpVtbl->CloneMesh(mesh, tc[2].create_options | D3DXMESH_VB_SHARE, tc[2].new_declaration, test_context->device, &mesh_clone); - todo_wine ok(hr == D3DERR_INVALIDCALL, "CloneMesh D3DXMESH_VB_SHARE with new" - " declaration. Got %x, expected D3DERR_INVALIDCALL\n", - hr); + ok(hr == D3DERR_INVALIDCALL, "CloneMesh D3DXMESH_VB_SHARE with new" + " declaration. Got %x, expected D3DERR_INVALIDCALL\n", + hr); mesh->lpVtbl->Release(mesh); mesh = NULL; mesh_clone = NULL;