]> git.etc.gen.nz Git - picture-display.git/commitdiff
Handle the case in MPD if there is no status returned.
authorAndrew Ruthven <puck@catalyst.net.nz>
Sun, 21 Sep 2008 21:41:03 +0000 (09:41 +1200)
committerAndrew Ruthven <puck@dirk.wgtn.cat-it.co.nz>
Sun, 21 Sep 2008 21:41:03 +0000 (09:41 +1200)
lib/Display/Plugins/MPD.pm

index e9b9b08bcf9f46d3bde38c184d1f19e8350fb63b..8a7362dad4bc31305a3f3a3892949bd9e28426d6 100644 (file)
@@ -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();