diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-26 17:10:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-26 17:10:16 +0100 |
commit | ce114e35dda4b3f282abb458f8409db2369b279e (patch) | |
tree | 716f61454aa456f1b71fd395b47eeb524a6a898f | |
parent | 5eeb06ffd1bf9cc79142760c372c17cd858cbe49 (diff) | |
parent | 1d576f17a78c07201bdab4bce0a75639a8cb42cf (diff) |
Merge pull request #26313 from ivanarh/master
iOS: Fixed possible crash in applicationDidReceiveMemoryWarning
-rw-r--r-- | platform/iphone/app_delegate.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index bb0c11c767..d160553050 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -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 { |