src/video/cocoa/SDL_cocoawindow.m
changeset 8978 7753e4fd3d1d
parent 8953 dc80dc0bd22e
child 8986 1c81316ac642
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sun Jul 06 22:15:31 2014 +0100
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Jul 07 10:33:32 2014 -0700
     1.3 @@ -1544,8 +1544,6 @@
     1.4      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     1.5      SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
     1.6  
     1.7 -    window->driverdata = NULL;
     1.8 -
     1.9      if (data) {
    1.10          [data->listener close];
    1.11          [data->listener release];
    1.12 @@ -1562,6 +1560,8 @@
    1.13  
    1.14          SDL_free(data);
    1.15      }
    1.16 +    window->driverdata = NULL;
    1.17 +
    1.18      [pool release];
    1.19  }
    1.20