iOS: Fixed crashes when rotating the screen after destroying a window.
diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m
index 3e26113..3dc3910 100644
--- a/src/video/uikit/SDL_uikitwindow.m
+++ b/src/video/uikit/SDL_uikitwindow.m
@@ -316,6 +316,9 @@ UIKit_DestroyWindow(_THIS, SDL_Window * window)
for (SDL_uikitview *view in views) {
[view setSDLWindow:NULL];
}
+
+ data.uiwindow.rootViewController = nil;
+ data.uiwindow.hidden = YES;
}
}
window->driverdata = NULL;