[PATCH 1/2] wined3d: Allow passing NULL to context_reacquire().
Józef Kucia
jkucia at codeweavers.com
Sat May 20 07:12:31 CDT 2017
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
A context associated with a query may be destroyed together
with a swapchain.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
Fixes https://bugs.winehq.org/show_bug.cgi?id=42873
---
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,
--
2.10.2
More information about the wine-patches
mailing list