wined3d: Only flush valid contexts in wined3d_cs_exec_flush().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-08-02 18:40:33 +02:00 committed by Alexandre Julliard
parent fc5bd1b438
commit 6a5c372541
1 changed files with 2 additions and 1 deletions

View File

@ -830,7 +830,8 @@ static void wined3d_cs_exec_flush(struct wined3d_cs *cs, const void *data)
struct wined3d_context *context;
context = context_acquire(cs->device, NULL, 0);
context->gl_info->gl_ops.gl.p_glFlush();
if (context->valid)
context->gl_info->gl_ops.gl.p_glFlush();
context_release(context);
}