the 'playlist' idle event returns no result in this case which lead to
an attempt to dereference undefined value
$self->connect_mpd;
$mpd->send('playlist')->on_done(
sub {
$self->connect_mpd;
$mpd->send('playlist')->on_done(
sub {
- my $present = scalar @{ $_[0] };
+ my $present = scalar @{ $_[0] // [] };
$log->notice( "Playlist contains $present songs. Wanted: "
. $opt->target_queue_length );
$log->notice( "Playlist contains $present songs. Wanted: "
. $opt->target_queue_length );