# HG changeset patch # User Sam Lantinga # Date 1273444390 25200 # Node ID 5e1f9cb9fa984867e572b9c1f1ee282d52210e93 # Parent 0a5dbe96c3be4650d2b32ebc5991d0fb8064059c Fixed compiler warnings diff -r 0a5dbe96c3be -r 5e1f9cb9fa98 src/video/cocoa/SDL_cocoavideo.m --- a/src/video/cocoa/SDL_cocoavideo.m Sun May 09 15:24:31 2010 -0700 +++ b/src/video/cocoa/SDL_cocoavideo.m Sun May 09 15:33:10 2010 -0700 @@ -39,8 +39,6 @@ static void Cocoa_DeleteDevice(SDL_VideoDevice * device) { - SDL_VideoData *data = (SDL_VideoData *) device->driverdata; - SDL_free(device->driverdata); SDL_free(device); } @@ -57,8 +55,10 @@ device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device) { data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + } else { + data = NULL; } - if (!device || !data) { + if (!data) { SDL_OutOfMemory(); if (device) { SDL_free(device); @@ -176,4 +176,3 @@ } /* vim: set ts=4 sw=4 expandtab: */ -