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:
parent
9737f765e5
commit
7f089714a6
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user