aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSebastian Krzyszkowiak2019-06-17 22:28:30 +0200
committerFilippos Karapetis2019-06-18 00:10:03 +0300
commita060d35418e27aa6af7eaf45aca78d2b993e1561 (patch)
treefff633e1c2b1994f73f4165748dbdb823650e9ba /engines
parentafefb386178bd34594c9ac56144ccaed1fd007a3 (diff)
downloadscummvm-rg350-a060d35418e27aa6af7eaf45aca78d2b993e1561.tar.gz
scummvm-rg350-a060d35418e27aa6af7eaf45aca78d2b993e1561.tar.bz2
scummvm-rg350-a060d35418e27aa6af7eaf45aca78d2b993e1561.zip
SLUDGE: fix crash in FloorManager::setFloorNull
numPolygons wasn't getting reset to 0, so the next invocation was trying to delete non-existent polygons
Diffstat (limited to 'engines')
-rw-r--r--engines/sludge/floor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/sludge/floor.cpp b/engines/sludge/floor.cpp
index c51fcc4309..eb961e9efa 100644
--- a/engines/sludge/floor.cpp
+++ b/engines/sludge/floor.cpp
@@ -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;