Module: wine Branch: master Commit: c9ea06e7a8fef557bd781c2b56cd81a3629ec839 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c9ea06e7a8fef557bd781c2b56... Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sat May 20 14:12:31 2017 +0200 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(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 89731e5..6d09c22 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,