Fixed compiler warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 09 May 2010 15:33:10 -0700
changeset 44575e1f9cb9fa98
parent 4456 0a5dbe96c3be
child 4458 c9584df65367
Fixed compiler warnings
src/video/cocoa/SDL_cocoavideo.m
     1.1 --- a/src/video/cocoa/SDL_cocoavideo.m	Sun May 09 15:24:31 2010 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoavideo.m	Sun May 09 15:33:10 2010 -0700
     1.3 @@ -39,8 +39,6 @@
     1.4  static void
     1.5  Cocoa_DeleteDevice(SDL_VideoDevice * device)
     1.6  {
     1.7 -    SDL_VideoData *data = (SDL_VideoData *) device->driverdata;
     1.8 -
     1.9      SDL_free(device->driverdata);
    1.10      SDL_free(device);
    1.11  }
    1.12 @@ -57,8 +55,10 @@
    1.13      device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
    1.14      if (device) {
    1.15          data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
    1.16 +    } else {
    1.17 +        data = NULL;
    1.18      }
    1.19 -    if (!device || !data) {
    1.20 +    if (!data) {
    1.21          SDL_OutOfMemory();
    1.22          if (device) {
    1.23              SDL_free(device);
    1.24 @@ -176,4 +176,3 @@
    1.25  }
    1.26  
    1.27  /* vim: set ts=4 sw=4 expandtab: */
    1.28 -