From d8a16361191445dd357697d4404e7a65822158c3 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 5 Jun 2025 15:52:27 +0200 Subject: [PATCH] Fix crash when trying to scroll empty window. --- ircplom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircplom.py b/ircplom.py index 96f5743..83ff8d1 100755 --- a/ircplom.py +++ b/ircplom.py @@ -547,8 +547,8 @@ class LogWidget(ScrollableWidget): self._wrapped_idx = min(-1, self._wrapped_idx + self._y_pgscroll) history_idx_to_wrapped_idx = self._wrapped[self._wrapped_idx][0] - assert if history_idx_to_wrapped_idx is not None: - self._history_idx = history_idx_to_wrapped_idx - len(self._history) + if history_idx_to_wrapped_idx is not None: + self._history_idx = history_idx_to_wrapped_idx - len(self._history) class Window(Widget): -- 2.30.2