From 2671db94c7c3d41b9f969d4c001f1f3655c0d63a Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Sat, 27 Jan 2024 16:46:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Fixed=20crash=20on=20em?= =?UTF-8?q?pty=20search=20result=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)