From c9ea06e7a8fef557bd781c2b56cd81a3629ec839 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sat, 20 May 2017 14:12:31 +0200 Subject: [PATCH] wined3d: Allow passing NULL to context_reacquire(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A context associated with a query may be destroyed together with a swapchain. Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 89731e5db2c..6d09c222d41 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3970,7 +3970,7 @@ struct wined3d_context *context_reacquire(const struct wined3d_device *device, { struct wined3d_context *current_context; - if (context->tid != GetCurrentThreadId()) + if (!context || context->tid != GetCurrentThreadId()) return NULL; current_context = context_acquire(device, context->current_rt.texture,