comparison src/audio/SDL_audiodev.c @ 2258:771bd3389e3a

Date: Fri, 17 Aug 2007 01:12:31 +0200 From: Couriersud Subject: fix for audio dsp exit crash / various dfb issues The current code will crash on exiting an application. The attached diff fixes the issue.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 17 Aug 2007 02:54:12 +0000
parents 866052b01ee5
children 99210400e8b9
comparison
equal deleted inserted replaced
2257:340942cfda48 2258:771bd3389e3a
74 SDL_FreeUnixAudioDevices(char ***devices, int *devCount) 74 SDL_FreeUnixAudioDevices(char ***devices, int *devCount)
75 { 75 {
76 int i = *devCount; 76 int i = *devCount;
77 if ((i > 0) && (*devices != NULL)) { 77 if ((i > 0) && (*devices != NULL)) {
78 while (i--) { 78 while (i--) {
79 SDL_free((*devices)[*devCount]); 79 SDL_free((*devices)[i]);
80 } 80 }
81 } 81 }
82 82
83 if (*devices != NULL) { 83 if (*devices != NULL) {
84 SDL_free(*devices); 84 SDL_free(*devices);