Commit 7267835842814ebfc2896d006b70c7d0b03293ae

Alex Szpakowski 2015-11-12T20:58:11

iOS: Fixed crashes when rotating the screen after destroying a window.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;