Add guard against null-audio in init playback
This commit is contained in:
parent
d49811358a
commit
91cc891b36
@ -272,6 +272,8 @@ const i32 audio_playVorbis(MemoryArena_ *arena, AudioManager *audioManager,
|
||||
AudioRenderer *audioRenderer, AudioVorbis *vorbis,
|
||||
i32 numPlays)
|
||||
{
|
||||
if(vorbis) return -1;
|
||||
|
||||
i32 result = initRendererForPlayback(arena, audioManager, audioRenderer,
|
||||
vorbis, numPlays);
|
||||
|
||||
@ -302,6 +304,8 @@ const i32 audio_streamPlayVorbis(MemoryArena_ *arena, AudioManager *audioManager
|
||||
// TODO(doyle): Streaming leaks memory, we don't free the "copy audio"
|
||||
ASSERT(INVALID_CODE_PATH);
|
||||
|
||||
if(vorbis) return -1;
|
||||
|
||||
i32 result = initRendererForPlayback(arena, audioManager, audioRenderer,
|
||||
vorbis, numPlays);
|
||||
// NOTE(doyle): We make a copy of the audio vorbis file using all the same
|
||||
|
Loading…
Reference in New Issue
Block a user