mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 10:33:59 +02:00
* Don't try to set an invalid page.
This commit is contained in:
@@ -501,6 +501,9 @@ PlaylistManager::applyFilter()
|
|||||||
void
|
void
|
||||||
PlaylistManager::setPage( ViewPage* page, bool trackHistory )
|
PlaylistManager::setPage( ViewPage* page, bool trackHistory )
|
||||||
{
|
{
|
||||||
|
if ( !page )
|
||||||
|
return;
|
||||||
|
|
||||||
unlinkPlaylist();
|
unlinkPlaylist();
|
||||||
|
|
||||||
if ( !m_pageHistory.contains( page ) )
|
if ( !m_pageHistory.contains( page ) )
|
||||||
@@ -797,8 +800,12 @@ void
|
|||||||
PlaylistManager::showCurrentTrack()
|
PlaylistManager::showCurrentTrack()
|
||||||
{
|
{
|
||||||
ViewPage* page = pageForInterface( AudioEngine::instance()->currentTrackPlaylist() );
|
ViewPage* page = pageForInterface( AudioEngine::instance()->currentTrackPlaylist() );
|
||||||
|
|
||||||
|
if ( page )
|
||||||
|
{
|
||||||
setPage( page );
|
setPage( page );
|
||||||
page->jumpToCurrentTrack();
|
page->jumpToCurrentTrack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user