Commit 8c4ed16c5e870cb3ad01a8ba2720f6d3b604ca6d

Anton Maminov 2013-06-20T11:12:29

mpd_client.rb:169:in `disconnect': undefined method `info' for nil:NilClass

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/mpd_client.rb b/lib/mpd_client.rb
index 063ffb2..28f5779 100644
--- a/lib/mpd_client.rb
+++ b/lib/mpd_client.rb
@@ -166,7 +166,7 @@ class MPDClient
   end
 
   def disconnect
-    log.info("MPD disconnect")
+    log.info("MPD disconnect") if log
     @socket.close
     reset
   end