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

This commit is contained in:
Henri Verbeet 2015-07-30 11:10:58 +02:00 committed by Alexandre Julliard
parent 4371946d94
commit e5c793e637
1 changed files with 2 additions and 1 deletions

View File

@ -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;