Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 9, 2010
1 parent c922d9d commit d007e1b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/video/cocoa/SDL_cocoavideo.m
Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down Expand Up @@ -176,4 +176,3 @@
}

/* vim: set ts=4 sw=4 expandtab: */

0 comments on commit d007e1b

Please sign in to comment.