VirtualBox

Changeset 50276 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Jan 29, 2014 7:36:53 PM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: proper cleanup, more bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/htable.cpp

    r50178 r50276  
    101101static void* crHTablePutToSlot(PCRHTABLE pTbl, uint32_t iSlot, void* pvData)
    102102{
     103    Assert(pvData);
    103104    void* pvOld = pTbl->paData[iSlot];
    104105    pTbl->paData[iSlot] = pvData;
     
    111112VBOXHTABLEDECL(int) CrHTablePutToSlot(PCRHTABLE pTbl, CRHTABLE_HANDLE hHandle, void* pvData)
    112113{
     114    if (!pvData)
     115    {
     116        AssertMsgFailed(("pvData is NULL\n"));
     117        return VERR_INVALID_PARAMETER;
     118    }
    113119    uint32_t iIndex = crHTableHandle2Index(hHandle);
    114     if (iIndex >= pTbl->cData)
     120    if (iIndex >= pTbl->cSize)
    115121    {
    116122        int rc = crHTableRealloc(pTbl, iIndex + RT_MAX(10, pTbl->cSize/4));
     
    129135VBOXHTABLEDECL(CRHTABLE_HANDLE) CrHTablePut(PCRHTABLE pTbl, void* pvData)
    130136{
     137    if (!pvData)
     138    {
     139        AssertMsgFailed(("pvData is NULL\n"));
     140        return VERR_INVALID_PARAMETER;
     141    }
     142
    131143    if (pTbl->cSize == pTbl->cData)
    132144    {
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