Fix hub memory leak.

This commit is contained in:
Steve 2018-02-22 19:01:16 +00:00
parent bd02ee2b4d
commit b62b9fece7
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,7 @@ static void doMissionInfo(void);
static void drawHudWidgets(void);
static void awardMissionTrophies(void);
static void returnFromOptions(void);
void destroyHub(void);
static HubMission hubMissionHead;
static HubMission *hubMissionTail;
@ -606,6 +607,8 @@ static void startMission(void)
stopMusic();
destroyHub();
initWorld();
}
@ -774,4 +777,7 @@ void destroyHub(void)
free(m);
}
memset(&hubMissionHead, 0, sizeof(HubMission));
hubMissionTail = &hubMissionHead;
}