Mercurial > sdl-ios-xcode
changeset 4457:5e1f9cb9fa98
Fixed compiler warnings
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 May 2010 15:33:10 -0700 |
parents | 0a5dbe96c3be |
children | c9584df65367 |
files | src/video/cocoa/SDL_cocoavideo.m |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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: */ -