Skip to content

Commit

Permalink
FULLPIPE: Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Nov 12, 2016
1 parent 6da591d commit f9d9bd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions engines/fullpipe/scenes/scene09.cpp
Expand Up @@ -108,18 +108,20 @@ void scene09_initScene(Scene *sc) {

g_vars->scene09_sceneBalls.clear();

StaticANIObject *newball = new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1));
newball->setAlpha(0xc8);
StaticANIObject *newball1 = new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1));
newball1->setAlpha(0xc8);

for (int i = 0; i < 4; i++) {
newball = new StaticANIObject(newball);
StaticANIObject *newball = new StaticANIObject(newball1);

newball->setAlpha(0xc8);
g_vars->scene09_sceneBalls.push_back(newball);

sc->addStaticANIObject(newball, 1);
}

delete newball1;

g_fp->setObjectState(sO_RightStairs_9, g_fp->getObjectEnumState(sO_RightStairs_9, sO_IsClosed));

GameVar *eggvar = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
Expand Down

0 comments on commit f9d9bd8

Please sign in to comment.