Skip to content

Commit

Permalink
Fix error with game preview
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Nov 28, 2024
1 parent 289df06 commit 4471a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pysollib/game/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2274,8 +2274,9 @@ def _autoPlay(self, autofaceup, autodrop, autodeal, sound):
self.finishMove()
if self.checkForWin():
return 1
self.top.update_idletasks()
self.top.busyUpdate()
if self.top is not None:
self.top.update_idletasks()
self.top.busyUpdate()
return 0

def _autoDeal(self, sound=True):
Expand Down
2 changes: 1 addition & 1 deletion pysollib/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ def dealToStacks(self, stacks, flip=1, reverse=0, frames=-1):
if flip:
self.game.flipMove(self)
self.game.moveMove(1, self, r, frames=frames)
if frames > 0:
if frames > 0 and self.game.top is not None:
self.game.top.update_idletasks()
self.game.top.busyUpdate()
self.game.leaveState(old_state)
Expand Down

0 comments on commit 4471a8a

Please sign in to comment.