Browse Source

Fixed uninitialized variable warning

Sam Lantinga 4 years ago
parent
commit
af5eb56c76
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/video/cocoa/SDL_cocoawindow.m

+ 2 - 2
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;