From fc34af428972d55da2989609d5261d2d263e1db9 Mon Sep 17 00:00:00 2001 From: Joe R <joeraz5@verizon.net> Date: Tue, 9 Aug 2022 20:57:37 -0400 Subject: [PATCH] Fixed error when clicking an empty search list. --- pysollib/tile/selectcardset.py | 2 ++ pysollib/tile/selectgame.py | 2 ++ pysollib/tile/selecttile.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/pysollib/tile/selectcardset.py b/pysollib/tile/selectcardset.py index 6b723001..6915969d 100644 --- a/pysollib/tile/selectcardset.py +++ b/pysollib/tile/selectcardset.py @@ -490,6 +490,8 @@ class SelectCardsetDialogWithPreview(MfxDialog): pos += 1 def selectSearchResult(self, event): + if self.list.size() <= 0: + return oldcur = self.list["cursor"] self.list["cursor"] = "watch" sel = self.list.get(self.list.curselection()) diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py index 6433d37f..fb86206c 100644 --- a/pysollib/tile/selectgame.py +++ b/pysollib/tile/selectgame.py @@ -534,6 +534,8 @@ class SelectGameDialogWithPreview(SelectGameDialog): pos += 1 def selectSearchResult(self, event): + if self.list.size() <= 0: + return oldcur = self.list["cursor"] self.list["cursor"] = "watch" sel = self.list.get(self.list.curselection()) diff --git a/pysollib/tile/selecttile.py b/pysollib/tile/selecttile.py index d2646633..a9b2fd46 100644 --- a/pysollib/tile/selecttile.py +++ b/pysollib/tile/selecttile.py @@ -268,6 +268,8 @@ class SelectTileDialogWithPreview(MfxDialog): pos += 1 def selectSearchResult(self, event): + if self.list.size() <= 0: + return oldcur = self.list["cursor"] self.list["cursor"] = "watch" sel = self.list.get(self.list.curselection())