mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Fix another crash related to debug accessing null pointers
This commit is contained in:
@@ -111,6 +111,13 @@ DatabaseCommand_SetDynamicPlaylistRevision::postCommitHook()
|
||||
if( playlist.isNull() ) // if it's neither an auto or station, it must not be auto-loaded, so we MUST have been told about it directly
|
||||
rawPl = m_playlist;
|
||||
|
||||
if ( rawPl == 0 )
|
||||
{
|
||||
tLog() <<"Got null playlist with guid:" << playlistguid() << "from source and collection:" << source()->friendlyName() << source()->collection()->name() << "and mode is static?:" << (m_mode == Static);
|
||||
Q_ASSERT( false );
|
||||
return;
|
||||
}
|
||||
|
||||
// workaround a bug in pre-0.1.0 tomahawks. they created dynamic playlists in OnDemand mode *always*, and then set the mode to the real one.
|
||||
// now that we separate them, if we get them as one and then get a changed mode, the playlist ends up in the wrong bucket in Collection.
|
||||
// so here we fix it if we have to.
|
||||
@@ -123,12 +130,6 @@ DatabaseCommand_SetDynamicPlaylistRevision::postCommitHook()
|
||||
else if ( rawPl->mode() == OnDemand && source()->collection()->station( playlistguid() ).isNull() ) // should be here
|
||||
source()->collection()->moveAutoToStation( playlistguid() );
|
||||
|
||||
if ( rawPl == 0 )
|
||||
{
|
||||
tLog() <<"Got null playlist with guid:" << playlistguid() << "from source and collection:" << source()->friendlyName() << source()->collection()->name() << "and mode is static?:" << (m_mode == Static);
|
||||
Q_ASSERT( false );
|
||||
return;
|
||||
}
|
||||
if ( !m_controlsV.isEmpty() && m_controls.isEmpty() )
|
||||
{
|
||||
QList<QVariantMap> controlMap;
|
||||
|
Reference in New Issue
Block a user