Skip to content

Commit a4b9c63

Browse files
committed
Make sure we've assigned mixer->output_stream before calling MIX_CreateGroup() (thanks @AntTheAlchemist!)
1 parent 2c79c4b commit a4b9c63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SDL_mixer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,9 @@ static MIX_Mixer *CreateMixer(SDL_AudioStream *stream)
762762
}
763763
}
764764

765+
mixer->gain = 1.0f;
766+
mixer->output_stream = stream;
767+
765768
mixer->track_tags = SDL_CreateProperties();
766769
if (!mixer->track_tags) {
767770
goto failed;
@@ -772,9 +775,6 @@ static MIX_Mixer *CreateMixer(SDL_AudioStream *stream)
772775
goto failed;
773776
}
774777

775-
mixer->gain = 1.0f;
776-
mixer->output_stream = stream;
777-
778778
SDL_SetAudioStreamGetCallback(stream, MixerCallback, mixer);
779779

780780
MIX_VBAP2D_Init(&mixer->vbap2d, output_spec.channels);

0 commit comments

Comments
 (0)