From 400bd1b9f23cbca0d13df42522dce28efae19dbe Mon Sep 17 00:00:00 2001 From: daleclack Date: Thu, 4 Apr 2024 15:22:14 +0800 Subject: [PATCH] Fix crash of media player --- Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp index fbdba4b..adcf284 100644 --- a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp +++ b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp @@ -123,7 +123,7 @@ static void get_lyrics_line(const char *lyrics, char *lyrics_line1, gboolean res return; } - if (lyrics_loaded) + if (lyrics_loaded && lyrics) { // Find the '\n' while (lyrics[end_pos] != '\n' && lyrics[end_pos] != '\0')