From e5c793e637784ac017f99b25bd4a53a98ea95116 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 30 Jul 2015 11:10:58 +0200 Subject: [PATCH] d2d1: Don't pass NULL resource data to ID3D10Device_CreateTexture2D(). --- dlls/d2d1/bitmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c index 080663c7354..00359cbc72f 100644 --- a/dlls/d2d1/bitmap.c +++ b/dlls/d2d1/bitmap.c @@ -228,7 +228,8 @@ HRESULT d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_d3d_render_target resource_data.pSysMem = src_data; resource_data.SysMemPitch = pitch; - if (FAILED(hr = ID3D10Device_CreateTexture2D(render_target->device, &texture_desc, &resource_data, &texture))) + if (FAILED(hr = ID3D10Device_CreateTexture2D(render_target->device, &texture_desc, + src_data ? &resource_data : NULL, &texture))) { ERR("Failed to create texture, hr %#x.\n", hr); return hr; -- 2.11.4.GIT