wined3d: Avoid trying to get backup DC when context is no longer associated with 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:
Józef Kucia 2016-10-05 11:17:05 +02:00 committed by Alexandre Julliard
parent 8673dca87d
commit 6f7e0d3dba
1 changed files with 1 additions and 1 deletions

View File

@ -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 * 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 * make this work windowless contexts would need to be handled by the
* device. */ * device. */
if (ctx->destroyed) if (ctx->destroyed || !swapchain)
{ {
FIXME("Unable to get backup dc for destroyed context %p.\n", ctx); FIXME("Unable to get backup dc for destroyed context %p.\n", ctx);
context_set_current(NULL); context_set_current(NULL);