Merge pull request #26313 from ivanarh/master

iOS: Fixed possible crash in applicationDidReceiveMemoryWarning
This commit is contained in:
Rémi Verschelde 2019-02-26 17:10:16 +01:00 committed by GitHub
commit ce114e35dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,8 +598,10 @@ static int frame_count = 0;
};
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
OS::get_singleton()->get_main_loop()->notification(
MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(
MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
}
};
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {