From 6f7e0d3dba6e8be7973a955c27349c49c64e1434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 5 Oct 2016 11:17:05 +0200 Subject: [PATCH] wined3d: Avoid trying to get backup DC when context is no longer associated with swapchain. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 f24958793ac..89cc9cedea8 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1069,7 +1069,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx) * a swapchain, so we can't use the swapchain to get a backup dc. To * make this work windowless contexts would need to be handled by the * device. */ - if (ctx->destroyed) + if (ctx->destroyed || !swapchain) { FIXME("Unable to get backup dc for destroyed context %p.\n", ctx); context_set_current(NULL);