aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/cine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cine/cine.cpp')
-rw-r--r--engines/cine/cine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 6c5069038a..fad6cf3f6a 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -75,7 +75,6 @@ CineEngine::~CineEngine() {
Common::clearAllSpecialDebugLevels();
free(palPtr);
- free(partBuffer);
free(textDataPtr);
}
@@ -154,7 +153,9 @@ void CineEngine::initialize() {
collisionPage = new byte[320 * 200];
textDataPtr = (byte *)malloc(8000);
- partBuffer = (PartBuffer *)malloc(NUM_MAX_PARTDATA * sizeof(PartBuffer));
+ // Clear part buffer as there's nothing loaded into it yet.
+ // Its size will change when loading data into it with the loadPart function.
+ partBuffer.clear();
if (g_cine->getGameType() == Cine::GType_OS) {
readVolCnf();