wined3d: Avoid potential NULL pointer dereference (Coverity).

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:
Józef Kucia 2017-08-31 09:04:34 +02:00 committed by Alexandre Julliard
parent 741fe13d44
commit b202586ee9
1 changed files with 3 additions and 3 deletions

View File

@ -1317,10 +1317,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
if (prev)
InterlockedDecrement(&prev->resource->bind_count);
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
if (op->initial_count != ~0u)
if (op->view && op->initial_count != ~0u)
wined3d_unordered_access_view_set_counter(op->view, op->initial_count);
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
}
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,