Commit e5c793e6 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d2d1: Don't pass NULL resource data to ID3D10Device_CreateTexture2D().

parent 4371946d
...@@ -228,7 +228,8 @@ HRESULT d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_d3d_render_target ...@@ -228,7 +228,8 @@ HRESULT d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_d3d_render_target
resource_data.pSysMem = src_data; resource_data.pSysMem = src_data;
resource_data.SysMemPitch = pitch; 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); ERR("Failed to create texture, hr %#x.\n", hr);
return hr; return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment