1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 16:29:43 +01:00

Unregister updater from playlist on deletion

This commit is contained in:
Leo Franchi 2012-04-30 22:43:12 -04:00
parent 8392251280
commit 029dd935c9
2 changed files with 8 additions and 1 deletions

View File

@ -70,6 +70,13 @@ PlaylistUpdaterInterface::PlaylistUpdaterInterface( const playlist_ptr& pl )
}
PlaylistUpdaterInterface::~PlaylistUpdaterInterface()
{
if ( !m_playlist.isNull() )
m_playlist->removeUpdater( this );
}
void
PlaylistUpdaterInterface::save()
{

View File

@ -56,7 +56,7 @@ public:
explicit PlaylistUpdaterInterface( const playlist_ptr& pl );
virtual ~PlaylistUpdaterInterface(){}
virtual ~PlaylistUpdaterInterface();
// What type you are. If you add a new updater, add the creation code as well.
virtual QString type() const = 0;