summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-01-27 16:46:26 +0100
committerRobert Honz <exislow+github@gmail.com>2024-01-27 16:46:26 +0100
commit2671db94c7c3d41b9f969d4c001f1f3655c0d63a (patch)
tree87cc8155a3bd94f70f78cccea7e016167039abde
parenta348909897b8a4453ec0b8764f564a4970b6e238 (diff)
downloadtidal-dl-ng-2671db94c7c3d41b9f969d4c001f1f3655c0d63a.tar.gz
🛠️ Fixed crash on empty search result list.
-rw-r--r--tidal_dl_ng/gui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py
index dec6e4e..b99a2c7 100644
--- a/tidal_dl_ng/gui.py
+++ b/tidal_dl_ng/gui.py
@@ -272,7 +272,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.tr_results.clear()
# Count how many digits the list length has,
- count_digits: int = int(math.log10(len(results))) + 1
+ count_digits: int = int(math.log10(len(results) if results else 1)) + 1
for item in results:
child = self.populate_tree_result_child(item=item, index_count_digits=count_digits)