VirtualBox

Ignore:
Timestamp:
Aug 24, 2012 11:19:31 AM (12 years ago)
Author:
vboxsync
Message:

wddm/3d: fix app crashes on shut down

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c

    r42516 r42971  
    19581958    }
    19591959
     1960    if (This->swapchains)
     1961    {
    19601962    HeapFree(GetProcessHeap(), 0, This->swapchains);
    19611963    This->swapchains = NULL;
    19621964    This->NumberOfSwapChains = 0;
     1965    }
     1966    else
     1967    {
     1968        Assert(!This->NumberOfSwapChains);
     1969    }
    19631970
    19641971    for (i = 0; i < This->NumberOfPalettes; i++) HeapFree(GetProcessHeap(), 0, This->palettes[i]);
     
    70057012    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
    70067013    int i;
     7014    IWineD3DSwapChain **pvOldBuf = This->swapchains;
     7015
    70077016    for (i = 0; i < This->NumberOfSwapChains; ++i)
    70087017    {
     
    70427051            context_destroy(This, This->contexts[0]);
    70437052        }
    7044     }
     7053        This->swapchains = NULL;
     7054    }
     7055
     7056    if (pvOldBuf)
     7057        HeapFree(GetProcessHeap(), 0, pvOldBuf);
     7058
    70457059    return WINED3D_OK;
    70467060}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette