mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-13 18:05:47 +00:00
audio: don't allocate buffer in SDL_SetAudioPostmixCallback for NULL callback.
This commit is contained in:
parent
2a950f6ae6
commit
ac88ffb7ea
1 changed files with 1 additions and 1 deletions
|
|
@ -1484,7 +1484,7 @@ int SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallbac
|
|||
int retval = 0;
|
||||
if (logdev) {
|
||||
SDL_AudioDevice *device = logdev->physical_device;
|
||||
if (!device->postmix_buffer) {
|
||||
if (callback && !device->postmix_buffer) {
|
||||
device->postmix_buffer = (float *)SDL_aligned_alloc(SDL_SIMDGetAlignment(), device->work_buffer_size);
|
||||
if (device->mix_buffer == NULL) {
|
||||
retval = SDL_OutOfMemory();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue