mpd_client.rb:169:in `disconnect': undefined method `info' for nil:NilClass
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