wined3d: Only delete the GL contexts after unloading resources in wined3d_device_reset().

The updateSurfaceDesc() calls potentially make GL calls.
This commit is contained in:
Henri Verbeet 2011-08-22 21:02:45 +02:00 committed by Alexandre Julliard
parent 9df014b9de
commit b474225386

View file

@ -5762,8 +5762,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_stateblock_decref(device->updateStateBlock);
wined3d_stateblock_decref(device->stateBlock);
delete_opengl_contexts(device, swapchain);
if (present_parameters->Windowed)
{
mode.Width = swapchain->orig_width;
@ -5819,6 +5817,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
}
delete_opengl_contexts(device, swapchain);
if (!present_parameters->Windowed != !swapchain->presentParms.Windowed
|| DisplayModeChanged)
{