wined3d: Allow passing NULL to context_reacquire().

A context associated with a query may be destroyed together
with a swapchain.

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:
Alistair Leslie-Hughes 2017-05-20 14:12:31 +02:00 committed by Alexandre Julliard
parent e6b9f9a634
commit c9ea06e7a8
1 changed files with 1 additions and 1 deletions

View File

@ -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,