-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-05-08 um 11:31 schrieb Aaryaman Vasishta:
d3drm_img = NULL; d3drm_img = IDirect3DRMTexture2_GetImage(texture2); - todo_wine ok(!!d3drm_img, "Failed to get image.\n"); - todo_wine ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img); + ok(!!d3drm_img, "Failed to get image.\n"); + ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
This is a problem of the exiting code code more than the patch: The d3drm_img = NULL assignment is redundant. Since GetImage returns the image as a return value the destination will be overwritten, no matter how GetImage behaves. The problem of a getter not writing anything can only happen when you pass a pointer and the function writes a value to that pointer.
What happens when GetImage is called on an uninitialized Texture?