Skip to content

Commit

Permalink
Don't try to get isPlaylist() here, as we'd only get here if `$play…
Browse files Browse the repository at this point in the history
…listObj` wasn't a playlist.
  • Loading branch information
mherger committed Apr 27, 2022
1 parent a845d0d commit 2a10761
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Slim/Control/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2344,13 +2344,10 @@ sub playlistsDeleteCommand {


sub _wipePlaylist {

my $playlistObj = shift;


if ( ! ( blessed($playlistObj) && $playlistObj->isPlaylist() ) ) {
$log->error('PlaylistObj not right for this sub: ', $playlistObj);
$log->error('PlaylistObj not right for this sub: ', $playlistObj->isPlaylist() );
Slim::Utils::Log::logBacktrace('PlaylistObj not right for this sub: ' . $playlistObj);
return 0;
}

Expand Down Expand Up @@ -3240,8 +3237,10 @@ sub _playlistXitem_load_done {

if ($wipePlaylist) {
my $playlistObj = Slim::Schema->objectForUrl($url);
_wipePlaylist($playlistObj);

if ($playlistObj && blessed($playlistObj) && $playlistObj->isPlaylist()) {
_wipePlaylist($playlistObj);
}
}

Slim::Control::Request::notifyFromArray($client, ['playlist', 'load_done']);
Expand Down

0 comments on commit 2a10761

Please sign in to comment.