wined3d: Do not crash when attempting to issue draw call with no attachments.
The is broken since by 2641c5c28f
.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fedabd7dd7
commit
f4f2d4052b
|
@ -427,7 +427,10 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
|||
|
||||
if (!(rtv = fb->render_targets[0]))
|
||||
rtv = fb->depth_stencil;
|
||||
context = context_acquire(device, wined3d_texture_from_resource(rtv->resource), rtv->sub_resource_idx);
|
||||
if (rtv)
|
||||
context = context_acquire(device, wined3d_texture_from_resource(rtv->resource), rtv->sub_resource_idx);
|
||||
else
|
||||
context = context_acquire(device, NULL, 0);
|
||||
if (!context->valid)
|
||||
{
|
||||
context_release(context);
|
||||
|
|
Loading…
Reference in New Issue