From 602a3d4775b435b353e83d0f730447275406e698 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 26 Jun 2016 22:01:43 +0100 Subject: [PATCH] do not free non allocated array --- src/object/RideObject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/object/RideObject.cpp b/src/object/RideObject.cpp index bdd04cf3c6..6b094cda8d 100644 --- a/src/object/RideObject.cpp +++ b/src/object/RideObject.cpp @@ -36,7 +36,10 @@ enum OBJ_STRING_ID RideObject::~RideObject() { - Memory::FreeArray(_peepLoadingPositions, 4); + for (int i = 0; i < 4; i++) + { + Memory::Free(_peepLoadingPositions[i]); + } } void RideObject::ReadLegacy(IStream * stream)