From fb33d08107b06c94638171ec42977e527a061b9b Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Mon, 22 Sep 2008 09:41:03 +1200 Subject: [PATCH] Handle the case in MPD if there is no status returned. --- lib/Display/Plugins/MPD.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Display/Plugins/MPD.pm b/lib/Display/Plugins/MPD.pm index e9b9b08..8a7362d 100644 --- a/lib/Display/Plugins/MPD.pm +++ b/lib/Display/Plugins/MPD.pm @@ -27,7 +27,7 @@ sub display { my $current = $self->{'mpd'}->current(); - if ($self->{'file'} ne $current->file()) { + if (defined $current && $self->{'file'} ne $current->file()) { my @lines = (); push @lines, $current->title() if defined $current->title(); push @lines, $current->album() if defined $current->album(); -- 2.30.2