playlist/cue/parser: fix nullptr dereference
Closes https://github.com/MusicPlayerDaemon/MPD/issues/974
This commit is contained in:
parent
ac46a84391
commit
cb4fdac469
2
NEWS
2
NEWS
|
@ -3,7 +3,7 @@ ver 0.22.1 (not yet released)
|
|||
- alsa: don't deadlock when the ALSA driver is buggy
|
||||
- jack, pulse: reduce the delay when stopping or pausing playback
|
||||
* playlist
|
||||
- cue: fix crash bug
|
||||
- cue: fix two crash bugs
|
||||
|
||||
ver 0.22 (2020/09/23)
|
||||
* protocol
|
||||
|
|
|
@ -262,7 +262,9 @@ CueParser::Feed2(char *p) noexcept
|
|||
if (previous != nullptr && previous->GetStartTime().ToMS() < (unsigned)position_ms)
|
||||
previous->SetEndTime(SongTime::FromMS(position_ms));
|
||||
|
||||
current->SetStartTime(SongTime::FromMS(position_ms));
|
||||
if (current != nullptr)
|
||||
current->SetStartTime(SongTime::FromMS(position_ms));
|
||||
|
||||
if(strcmp(nr, "00") != 0 || previous == nullptr)
|
||||
ignore_index = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue