summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-26 17:10:16 +0100
committerGitHub <noreply@github.com>2019-02-26 17:10:16 +0100
commitce114e35dda4b3f282abb458f8409db2369b279e (patch)
tree716f61454aa456f1b71fd395b47eeb524a6a898f
parent5eeb06ffd1bf9cc79142760c372c17cd858cbe49 (diff)
parent1d576f17a78c07201bdab4bce0a75639a8cb42cf (diff)
Merge pull request #26313 from ivanarh/master
iOS: Fixed possible crash in applicationDidReceiveMemoryWarning
-rw-r--r--platform/iphone/app_delegate.mm6
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 {