diff -r 362cd1b6f81a -r 6983c461550f eric6/Debugger/DebuggerInterfacePython.py --- a/eric6/Debugger/DebuggerInterfacePython.py Sat Feb 22 14:27:42 2020 +0100 +++ b/eric6/Debugger/DebuggerInterfacePython.py Sun Feb 23 13:19:20 2020 +0100 @@ -519,11 +519,12 @@ """ Public slot to flush the queue. """ - # Send commands that were waiting for the connection. - for cmd in self.queue: - self.__writeJsonCommandToSocket(cmd) - - self.queue = [] + if self.qsock is not None: + # Send commands that were waiting for the connection. + for cmd in self.queue: + self.__writeJsonCommandToSocket(cmd) + + self.queue = [] def shutdown(self): """