diff options
author | Sebastian Krzyszkowiak | 2019-06-17 22:28:30 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-06-18 00:10:03 +0300 |
commit | a060d35418e27aa6af7eaf45aca78d2b993e1561 (patch) | |
tree | fff633e1c2b1994f73f4165748dbdb823650e9ba /engines | |
parent | afefb386178bd34594c9ac56144ccaed1fd007a3 (diff) | |
download | scummvm-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.cpp | 1 |
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; |