[Add] Code to prevent objects from free'd when they were already freed before.
This commit is contained in:
parent
f2c7676846
commit
f6b0171562
12
src/space.c
12
src/space.c
@ -803,10 +803,16 @@ void planets_render(void) {
|
||||
// Clean up the system.
|
||||
void space_exit(void) {
|
||||
int i,j;
|
||||
|
||||
|
||||
// Free the names.
|
||||
if(planetname_stack) free(planetname_stack);
|
||||
if(systemname_stack) free(systemname_stack);
|
||||
if(planetname_stack) {
|
||||
free(planetname_stack);
|
||||
planetname_stack = NULL;
|
||||
}
|
||||
if(systemname_stack) {
|
||||
free(systemname_stack);
|
||||
systemname_stack = NULL;
|
||||
}
|
||||
spacename_nstack = 0;
|
||||
|
||||
// Free the systems.
|
||||
|
Loading…
Reference in New Issue
Block a user