Explorar o código

audio: Fixed incorrect assertion

Ryan C. Gordon %!s(int64=2) %!d(string=hai) anos
pai
achega
be0dc630b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/audio/SDL_audio.c

+ 1 - 1
src/audio/SDL_audio.c

@@ -1019,7 +1019,7 @@ SDL_AudioDevice *SDL_FindPhysicalAudioDeviceByCallback(SDL_bool (*callback)(SDL_
         SDL_SetError("Device not found");
     }
 
-    SDL_assert(!SDL_AtomicGet(&dev->condemned));  // shouldn't be in the list if pending deletion.
+    SDL_assert(!dev || !SDL_AtomicGet(&dev->condemned));  // shouldn't be in the list if pending deletion.
 
     return dev;
 }