[PATCH 3/7] wined3d: Avoid trying to get backup DC when context is no longer associated with swapchain.

Józef Kucia jkucia at codeweavers.com
Wed Oct 5 04:17:05 CDT 2016


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 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 f249587..89cc9ce 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);
-- 
2.7.3




More information about the wine-patches mailing list