SDL_mixer: mixer.c: Fixed the crash at the Mix_LoadMusic_RW

From 85da1e45564dc6430ff29ed949236ea60ea04f01 Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Wed, 15 Dec 2021 23:22:36 +0300
Subject: [PATCH] mixer.c: Fixed the crash at the Mix_LoadMusic_RW

I found this crash case a while ago at MixerX. It happen because the "fragment" wasn't properly updated and left being NULL. That leads an attempt to dereferrence it while it has NULL inside.
---
 src/mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mixer.c b/src/mixer.c
index ab11c57d..59c22d7b 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -636,7 +636,7 @@ static SDL_AudioSpec *Mix_LoadMusic_RW(SDL_RWops *src, int freesrc, SDL_AudioSpe
     Mix_UnlockAudio();
 
     if (count > 0) {
-        *audio_len = (count - 1) * fragment_size + fragment->size;
+        *audio_len = (count - 1) * fragment_size + last->size;
         *audio_buf = (Uint8 *)SDL_malloc(*audio_len);
         if (*audio_buf) {
             Uint8 *dst = *audio_buf;