SLUDGE: fix crash in FloorManager::setFloorNull

numPolygons wasn't getting reset to 0, so the next invocation was
trying to delete non-existent polygons
This commit is contained in:
Sebastian Krzyszkowiak 2019-06-17 22:28:30 +02:00 committed by Filippos Karapetis
parent afefb38617
commit a060d35418

View File

@ -116,6 +116,7 @@ void FloorManager::setFloorNull() {
delete[] _currentFloor->polygon[i].vertexID;
delete[] _currentFloor->matrix[i];
}
_currentFloor->numPolygons = 0;
delete[] _currentFloor->polygon;
_currentFloor->polygon = nullptr;
delete[] _currentFloor->vertex;