Commit af5eb56c7651cdc6fa3fe75cb5618ae9a32e276a

Sam Lantinga 2020-05-27T09:28:03

Fixed uninitialized variable warning

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 2bf1ef5..a669d45 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -1567,8 +1567,8 @@ int
 Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
 { @autoreleasepool
 {
-    NSView* nsview;
-    NSWindow *nswindow;
+    NSView* nsview = NULL;
+    NSWindow *nswindow = NULL;
 
     if ([(id)data isKindOfClass:[NSWindow class]]) {
       nswindow = (NSWindow*)data;