diff --git a/qutebrowser/misc/ipc.py b/qutebrowser/misc/ipc.py index 4f77379d0..4afae78e9 100644 --- a/qutebrowser/misc/ipc.py +++ b/qutebrowser/misc/ipc.py @@ -362,6 +362,9 @@ class IPCServer(QObject): @pyqtSlot() def on_timeout(self): """Cancel the current connection if it was idle for too long.""" + if self._socket is None: + log.ipc.error("on_timeout got called with None socket!") + return log.ipc.error("IPC connection timed out " "(socket 0x{:x}).".format(id(self._socket))) self._socket.disconnectFromServer()