Opened 10 years ago
Closed 10 years ago
Last modified 10 years ago
#12200 closed Bug Report - Crash (fixed)
MythMusic crash after new scan
Reported by: | JYA | Owned by: | paulh |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | Plugin - MythMusic | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Just upgraded a machine to use SG for MythMusic
Ran a scan, which contained less files than my local storage
Got a crash:
this patch fixes it:
diff --git a/mythplugins/mythmusic/mythmusic/musicplayer.cpp b/mythplugins/mythmusic/mythmusic/musicplayer.cpp index fdf777e..824154c 100644 --- a/mythplugins/mythmusic/mythmusic/musicplayer.cpp +++ b/mythplugins/mythmusic/mythmusic/musicplayer.cpp @@ -1083,7 +1083,8 @@ void MusicPlayer::restorePosition(void) { for (int x = 0; x < getCurrentPlaylist()->getTrackCount(); x++) { - if (getCurrentPlaylist()->getSongAt(x)->ID() == id) + if (getCurrentPlaylist()->getSongAt(x) && + getCurrentPlaylist()->getSongAt(x)->ID() == id) { m_currentTrack = x; break;
For whatever reasons, getCurrentPlaylist()->getSongAt(x) returned NULL
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 5447a509c2f19fd8c842d9a3b013a89cc88977be/mythtv: