wined3d: Make sure we have an active GL context before calling surface_remove_pbo().

This commit is contained in:
Henri Verbeet 2009-06-26 10:07:10 +02:00 committed by Alexandre Julliard
parent db5b126da6
commit 1b306c25e2
1 changed files with 1 additions and 0 deletions

View File

@ -4826,6 +4826,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
* but it isn't set (yet) in all cases it is getting called. */
if((convert != NO_CONVERSION) && (This->Flags & SFLAG_PBO)) {
TRACE("Removing the pbo attached to surface %p\n", This);
if (!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
surface_remove_pbo(This);
}