Do not attempt to stop the game-process if it is not running.

This makes the stop button switch back to play more promptly.
This commit is contained in:
Daniel Johnson 2023-12-17 09:40:57 -05:00
parent 3dcf146a94
commit 0eef634bbf

View file

@ -784,7 +784,8 @@ class Game(GObject.Object):
"""Finds the PIDs of processes that need killin'!"""
pids = self.get_game_pids()
if self.game_thread and self.game_thread.game_process:
pids.add(self.game_thread.game_process.pid)
if self.game_thread.game_process.poll() is None:
pids.add(self.game_thread.game_process.pid)
return pids
def get_game_pids(self):