[mythtv] RE: MythMusic segfault on empty playlists
Paul
mythtv at dsl.pipex.com
Thu Jan 13 13:33:21 EST 2005
Dustin Lucien wrote:
>MythMusic segfaults the frontend when I load without any playlists or
>ActivePlayQueue. If I go into select music, and choose one song to
>be added to the active play queue, it works fine. I started looking
>for a NULL pointer in databasebox or playlist.cpp, but haven't found
>it yet. Heading to bed, so I thought I'd send it into the list.
>-Dustin
I think the problem is in void PlaybackBox::checkForPlaylists()
the curMeta is NULL if there are no tracks to play.
Sorry can't create a patch at the moment, I have too many other changes
in the playbackbox.cpp file that aren't relevent to this problem.
If you make these simple changes I think it should solve the segfault.
if (class LCD * lcd = LCD::Get())
{
+ if (curMeta)
+ {
//Show the artist stuff on the LCD
QPtrList<LCDTextItem> textItems;
textItems.setAutoDelete(true);
textItems.append(new LCDTextItem(1,
ALIGN_CENTERED,
curMeta->Artist() +" [" +
curMeta->Album() + "] " +
curMeta->Title(), "Generic", true));
lcd->switchToGeneric(&textItems);
+ }
}
Paul
More information about the mythtv-dev
mailing list