From 6cf0bf76daf543d5a374f7c392aa045c5b25dcc2 Mon Sep 17 00:00:00 2001 From: Turki Jamaan <22967219+tjamaan@users.noreply.github.com> Date: Sat, 14 Jan 2023 01:40:24 +0300 Subject: [PATCH] iOS: fix accidentally flipped assertion (#2629) * iOS: fix accidentally flipped assertion * No need to update the changelog --- src/platform_impl/ios/event_loop.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/ios/event_loop.rs b/src/platform_impl/ios/event_loop.rs index de1feb42..5949bedc 100644 --- a/src/platform_impl/ios/event_loop.rs +++ b/src/platform_impl/ios/event_loop.rs @@ -114,7 +114,9 @@ impl EventLoop { F: 'static + FnMut(Event<'_, T>, &RootEventLoopWindowTarget, &mut ControlFlow), { unsafe { - let _application = UIApplication::shared(MainThreadMarker::new().unwrap()).expect( + let application = UIApplication::shared(MainThreadMarker::new().unwrap()); + assert!( + application.is_none(), "\ `EventLoop` cannot be `run` after a call to `UIApplicationMain` on iOS\n\ Note: `EventLoop::run` calls `UIApplicationMain` on iOS",