receiver: only close existing devices for receiver
This commit is contained in:
parent
6b77de813f
commit
cc0ddb8df5
|
@ -99,7 +99,8 @@ class Receiver:
|
|||
def close(self):
|
||||
handle, self.handle = self.handle, None
|
||||
for _n, d in self._devices.items():
|
||||
d.close()
|
||||
if d:
|
||||
d.close()
|
||||
self._devices.clear()
|
||||
return (handle and _base.close(handle))
|
||||
|
||||
|
|
Loading…
Reference in New Issue