[Add] Code to prevent objects from free'd when they were already freed before.

This commit is contained in:
Tamir Atias 2013-04-20 01:11:23 +03:00
parent f2c7676846
commit f6b0171562

View File

@ -805,8 +805,14 @@ void space_exit(void) {
int i,j; int i,j;
// Free the names. // Free the names.
if(planetname_stack) free(planetname_stack); if(planetname_stack) {
if(systemname_stack) free(systemname_stack); free(planetname_stack);
planetname_stack = NULL;
}
if(systemname_stack) {
free(systemname_stack);
systemname_stack = NULL;
}
spacename_nstack = 0; spacename_nstack = 0;
// Free the systems. // Free the systems.