1
0

Delete the entity before removing from the list

Old code was calling dereference on invalid iterator
This commit is contained in:
worktycho 2014-08-31 20:28:41 +01:00
parent b6d77d9679
commit 3e7332c70c

View File

@ -134,8 +134,8 @@ void cSetChunkData::RemoveInvalidBlockEntities(void)
);
cBlockEntityList::iterator itr2 = itr;
itr2++;
m_BlockEntities.erase(itr);
delete *itr;
m_BlockEntities.erase(itr);
itr = itr2;
}
else