diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index c408eb04219..78a3e1d46c1 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1744,17 +1744,14 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void * } else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_2D) { - struct wined3d_surface *dst_surface, *src_surface = NULL; + struct wined3d_surface *dst_surface, *src_surface; struct wined3d_texture *dst_texture, *src_texture; RECT dst_rect, src_rect; dst_texture = texture_from_resource(op->dst_resource); + src_texture = texture_from_resource(op->src_resource); dst_surface = dst_texture->sub_resources[op->dst_sub_resource_idx].u.surface; - if (op->src_resource) - { - src_texture = texture_from_resource(op->src_resource); - src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface; - } + src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface; SetRect(&dst_rect, op->dst_box.left, op->dst_box.top, op->dst_box.right, op->dst_box.bottom); SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom);