瀏覽代碼

audio: Fixed incorrect assertion

Ryan C. Gordon 2 年之前
父節點
當前提交
be0dc630b7
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
 }