ddraw: Unset the viewport if the current vp is deleted.

This commit is contained in:
Stefan Dösinger 2013-01-26 13:39:47 +01:00 committed by Alexandre Julliard
parent 0209b0a96c
commit 06ff1c710e
1 changed files with 7 additions and 0 deletions

View File

@ -833,6 +833,13 @@ static HRESULT WINAPI d3d_device3_DeleteViewport(IDirect3DDevice3 *iface, IDirec
return DDERR_INVALIDPARAMS;
}
if (device->current_viewport == vp)
{
TRACE("Deleting current viewport, unsetting and releasing\n");
IDirect3DViewport3_Release(viewport);
device->current_viewport = NULL;
}
vp->active_device = NULL;
list_remove(&vp->entry);