diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 94b71032f..cdd9b65d0 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -393,8 +393,9 @@ class SimpleMplayerSlaveModePlayer(SimpleMplayerPlayer): The trailing newline is automatically added.""" str_args = [str(x) for x in args] - self._process.stdin.write(" ".join(str_args).encode("utf8") + b"\n") - self._process.stdin.flush() + if self._process: + self._process.stdin.write(" ".join(str_args).encode("utf8") + b"\n") + self._process.stdin.flush() def seek_relative(self, secs: int) -> None: self.command("seek", secs, 0)