From 1e1db5dd0c2d95012a74cd803b65f7052662dcd5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Apr 2006 00:03:32 +0000 Subject: [PATCH] - Fixed: To prevent the pointer cleanup code from crashing numsectors has to be set to 0 when the sectors array is deleted. SVN r64 (trunk) --- docs/rh-log.txt | 2 ++ src/p_setup.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f59a5f104..401f9899d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ April 21, 2006 (Changes by Graf Zahl) +- Fixed: To prevent the pointer cleanup code from crashing numsectors has + to be set to 0 when the sectors array is deleted. - Added Zloba's fix for Linux's I_FindFirst. April 20, 2006 (Changes by Graf Zahl) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 932ebb510..32627fe1c 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2804,6 +2804,7 @@ void P_FreeLevelData () { delete[] sectors; sectors = NULL; + numsectors = 0; // needed for the pointer cleanup code } if (subsectors != NULL) {