wined3d: Handle shader_arb_free_context_data() during context creation.

This commit is contained in:
Henri Verbeet 2014-03-11 18:41:47 +01:00 committed by Alexandre Julliard
parent 82780d6ba6
commit a05dcd911e
1 changed files with 5 additions and 1 deletions

View File

@ -5052,8 +5052,12 @@ static BOOL shader_arb_allocate_context_data(struct wined3d_context *context)
static void shader_arb_free_context_data(struct wined3d_context *context)
{
struct shader_arb_priv *priv = context->swapchain->device->shader_priv;
struct shader_arb_priv *priv;
if (!context->swapchain)
return;
priv = context->swapchain->device->shader_priv;
if (priv->last_context == context)
priv->last_context = NULL;
}