summaryrefslogtreecommitdiff
path: root/clMonty.py
diff options
context:
space:
mode:
Diffstat (limited to 'clMonty.py')
-rw-r--r--clMonty.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/clMonty.py b/clMonty.py
index 368948f..361ab78 100644
--- a/clMonty.py
+++ b/clMonty.py
@@ -75,10 +75,11 @@ class Monty(QtCore.QObject):
def disconnect(self):
"""Disconnect from MPD."""
- self._client.close()
- self._client.disconnect()
- self._client=None
- self._killTimer(self.timerID)
+ if self._client:
+ self._client.close()
+ self._client.disconnect()
+ self._client=None
+ # don't kill timer, as it'll happen in timerEvent
def isConnected(self):
"""Returns true if we're connected to MPD, false otherwise."""