iOS: fix accidentally flipped assertion (#2629)

* iOS: fix accidentally flipped assertion

* No need to update the changelog
This commit is contained in:
Turki Jamaan 2023-01-14 01:40:24 +03:00 committed by GitHub
parent 9225b2812e
commit 6cf0bf76da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,9 @@ impl<T: 'static> EventLoop<T> {
F: 'static + FnMut(Event<'_, T>, &RootEventLoopWindowTarget<T>, &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",