Fix closing the game without audio
@@ -145,6 +145,7 @@ Sound_samples *create_sound_samples(const char *sample_files[],
void destroy_sound_samples(Sound_samples *sound_samples)
{
// TODO(#1025): Use a seperate callback function for audio handling and pass that into SDL_OpenAudioDevice
+ if (sound_samples->failed) return;
trace_assert(sound_samples);
trace_assert(sound_samples->dev);
SDL_CloseAudioDevice(sound_samples->dev);
