Fix null pointer dereference in SDL_BindAudioStreams()
This commit is contained in:
committed by
Ryan C. Gordon
parent
8b6eae2d4f
commit
751917cb6f
@@ -1792,15 +1792,11 @@ int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream **streams, int
|
|||||||
|
|
||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j <= i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
#ifdef _MSC_VER /* Visual Studio analyzer can't tell that we've already verified streams[j] isn't NULL */
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 28182)
|
|
||||||
#endif
|
|
||||||
SDL_UnlockMutex(streams[j]->lock);
|
SDL_UnlockMutex(streams[j]->lock);
|
||||||
#ifdef _MSC_VER
|
}
|
||||||
#pragma warning(pop)
|
if (streams[i]) {
|
||||||
#endif
|
SDL_UnlockMutex(streams[i]->lock);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user