mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-21 18:58:13 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -177,7 +177,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||
|
||||
// Initialize all variables that we clean on shutdown
|
||||
device->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*device->hidden));
|
||||
if (device->hidden == NULL) {
|
||||
if (!device->hidden) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||
|
||||
if (!device->iscapture) {
|
||||
device->hidden->mixbuf = (Uint8 *)SDL_malloc(device->buffer_size);
|
||||
if (device->hidden->mixbuf == NULL) {
|
||||
if (!device->hidden->mixbuf) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
SDL_memset(device->hidden->mixbuf, device->silence_value, device->buffer_size);
|
||||
|
Reference in New Issue
Block a user