mirror of https://github.com/encounter/SDL.git
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory II.
This commit is contained in:
parent
1043dd8c0d
commit
c9e8d1573a
|
@ -404,8 +404,7 @@ add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioD
|
||||||
SDL_UnlockMutex(current_audio.detectionLock);
|
SDL_UnlockMutex(current_audio.detectionLock);
|
||||||
SDL_free(item->original_name);
|
SDL_free(item->original_name);
|
||||||
SDL_free(item);
|
SDL_free(item);
|
||||||
SDL_OutOfMemory();
|
return SDL_OutOfMemory();
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1);
|
SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1);
|
||||||
|
|
Loading…
Reference in New Issue