diff --git a/src/libtomahawk/database/DatabaseCommand_SetPlaylistRevision.cpp b/src/libtomahawk/database/DatabaseCommand_SetPlaylistRevision.cpp index db1b6d01e..29e0a1ac7 100644 --- a/src/libtomahawk/database/DatabaseCommand_SetPlaylistRevision.cpp +++ b/src/libtomahawk/database/DatabaseCommand_SetPlaylistRevision.cpp @@ -103,12 +103,17 @@ DatabaseCommand_SetPlaylistRevision::postCommitHook() return; } - playlist->setRevision( m_newrev, - orderedentriesguids, - m_previous_rev_orderedguids, - true, // this *is* the newest revision so far - m_addedmap, - m_applied ); + if ( playlist->loaded() ) + { + playlist->setRevision( m_newrev, + orderedentriesguids, + m_previous_rev_orderedguids, + true, // this *is* the newest revision so far + m_addedmap, + m_applied ); + } + else + playlist->setCurrentrevision( m_newrev ); if ( source()->isLocal() ) Servent::instance()->triggerDBSync();