Changeset 50276 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Jan 29, 2014 7:36:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/htable.cpp
r50178 r50276 101 101 static void* crHTablePutToSlot(PCRHTABLE pTbl, uint32_t iSlot, void* pvData) 102 102 { 103 Assert(pvData); 103 104 void* pvOld = pTbl->paData[iSlot]; 104 105 pTbl->paData[iSlot] = pvData; … … 111 112 VBOXHTABLEDECL(int) CrHTablePutToSlot(PCRHTABLE pTbl, CRHTABLE_HANDLE hHandle, void* pvData) 112 113 { 114 if (!pvData) 115 { 116 AssertMsgFailed(("pvData is NULL\n")); 117 return VERR_INVALID_PARAMETER; 118 } 113 119 uint32_t iIndex = crHTableHandle2Index(hHandle); 114 if (iIndex >= pTbl->c Data)120 if (iIndex >= pTbl->cSize) 115 121 { 116 122 int rc = crHTableRealloc(pTbl, iIndex + RT_MAX(10, pTbl->cSize/4)); … … 129 135 VBOXHTABLEDECL(CRHTABLE_HANDLE) CrHTablePut(PCRHTABLE pTbl, void* pvData) 130 136 { 137 if (!pvData) 138 { 139 AssertMsgFailed(("pvData is NULL\n")); 140 return VERR_INVALID_PARAMETER; 141 } 142 131 143 if (pTbl->cSize == pTbl->cData) 132 144 {
Note:
See TracChangeset
for help on using the changeset viewer.