Only call al_*_destroy if Allegro is initialized.

Otherwise, it would crash if al_uinstall_system() has already been
called. Handling it this way eliminates the need to dealloc all objects
before calling al_uninstall_system(), which meant that it was the users
repsonsibility to call al_uninstall_system() after the user made sure
all objects are deallocated. Now the user does not get to see any
al_*() function.
This commit is contained in:
Jonathan Schleifer 2012-08-26 13:29:53 +02:00
parent c2baff8cd6
commit f32ef7ee28
4 changed files with 12 additions and 15 deletions

View file

@ -116,13 +116,4 @@ OF_APPLICATION_DELEGATE(TestMain)
}
}
}
- (void)applicationWillTerminate
{
/* Make sure they don't get deallocated after al_uninstall_system() */
display = nil;
eventQueue = nil;
al_uninstall_system();
}
@end