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;
|
cBlockEntityList::iterator itr2 = itr;
|
||||||
itr2++;
|
itr2++;
|
||||||
m_BlockEntities.erase(itr);
|
|
||||||
delete *itr;
|
delete *itr;
|
||||||
|
m_BlockEntities.erase(itr);
|
||||||
itr = itr2;
|
itr = itr2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user