diff --git a/plover/machine/treal.py b/plover/machine/treal.py index 922a9a9ba..aaa8f6932 100644 --- a/plover/machine/treal.py +++ b/plover/machine/treal.py @@ -50,6 +50,7 @@ def update(self, p): class Stenotype(StenotypeBase): def __init__(self, params): StenotypeBase.__init__(self) + self._machine = None def start_capture(self): """Begin listening for output from the stenotype machine.""" @@ -70,7 +71,8 @@ def callback(p): def stop_capture(self): """Stop listening for output from the stenotype machine.""" - self._machine.close() + if self._machine: + self._machine.close() self._stopped() else: