Delete the entity before removing from the list
Old code was calling dereference on invalid iterator
This commit is contained in:
parent
b6d77d9679
commit
3e7332c70c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user