1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Initialize to 0 in *all* constructors

This commit is contained in:
Leo Franchi
2011-10-13 08:28:22 -04:00
parent 8641222395
commit 01bf3a3818
2 changed files with 7 additions and 3 deletions

View File

@@ -93,6 +93,7 @@ PlaylistEntry::setLastSource( source_ptr s )
Playlist::Playlist( const source_ptr& author ) Playlist::Playlist( const source_ptr& author )
: m_source( author ) : m_source( author )
, m_lastmodified( 0 ) , m_lastmodified( 0 )
, m_updater( 0 )
{ {
} }
@@ -252,12 +253,12 @@ void
Playlist::reportDeleted( const Tomahawk::playlist_ptr& self ) Playlist::reportDeleted( const Tomahawk::playlist_ptr& self )
{ {
Q_ASSERT( self.data() == this ); Q_ASSERT( self.data() == this );
m_deleted = true;
m_source->collection()->deletePlaylist( self );
if ( m_updater ) if ( m_updater )
m_updater->remove(); m_updater->remove();
m_deleted = true;
m_source->collection()->deletePlaylist( self );
emit deleted( self ); emit deleted( self );
} }

View File

@@ -83,6 +83,9 @@ PlaylistUpdaterInterface::doSave()
void void
PlaylistUpdaterInterface::remove() PlaylistUpdaterInterface::remove()
{ {
if ( m_playlist.isNull() )
return;
TomahawkSettings* s = TomahawkSettings::instance(); TomahawkSettings* s = TomahawkSettings::instance();
const QString key = QString( "playlistupdaters/%1" ).arg( m_playlist->guid() ); const QString key = QString( "playlistupdaters/%1" ).arg( m_playlist->guid() );
removeFromSettings( key ); removeFromSettings( key );