1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

bail out on a deleted widget

This commit is contained in:
Leo Franchi 2011-08-20 00:58:32 -04:00
parent 9737f765e5
commit 7f089714a6

View File

@ -862,7 +862,7 @@ ViewManager::playlistForInterface( Tomahawk::PlaylistInterface* interface ) cons
{
foreach ( QWeakPointer<PlaylistView> view, m_playlistViews.values() )
{
if ( view.data()->playlistInterface() == interface )
if ( !view.isNull() && view.data()->playlistInterface() == interface )
{
return m_playlistViews.key( view );
}
@ -877,7 +877,7 @@ ViewManager::dynamicPlaylistForInterface( Tomahawk::PlaylistInterface* interface
{
foreach ( QWeakPointer<DynamicWidget> view, m_dynamicWidgets.values() )
{
if ( view.data()->playlistInterface() == interface )
if ( !view.isNull() && view.data()->playlistInterface() == interface )
{
return m_dynamicWidgets.key( view );
}