1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-20 12:52:30 +02:00

Use isNull instead of ! for shared pointer

This commit is contained in:
Uwe L. Korn
2014-05-08 00:16:25 +01:00
parent da8e2a2126
commit 499d837c5a

View File

@@ -110,11 +110,15 @@ DatabaseCommand_SetDynamicPlaylistRevision::postCommitHook()
// private, but we are a friend. will recall itself in its own thread: // private, but we are a friend. will recall itself in its own thread:
DynamicPlaylist* rawPl = 0; DynamicPlaylist* rawPl = 0;
dynplaylist_ptr playlist = source()->dbCollection()->autoPlaylist( playlistguid() ); dynplaylist_ptr playlist = source()->dbCollection()->autoPlaylist( playlistguid() );
if ( !playlist ) if ( playlist.isNull() )
{
playlist = source()->dbCollection()->station( playlistguid() ); playlist = source()->dbCollection()->station( playlistguid() );
}
if ( playlist ) if ( !playlist.isNull() )
{
rawPl = playlist.data(); rawPl = playlist.data();
}
else else
{ {
// if it's neither an auto or station, it must not be auto-loaded, so we MUST have been told about it directly // if it's neither an auto or station, it must not be auto-loaded, so we MUST have been told about it directly