home · contact · privacy
Fix crash when trying to scroll empty window.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 5 Jun 2025 13:52:27 +0000 (15:52 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 5 Jun 2025 13:52:27 +0000 (15:52 +0200)
ircplom.py

index 96f5743a1a2f506a3e55b5033aa3dca7875416cf..83ff8d15428dc48240fe513cf3e7fa3b8357ab84 100755 (executable)
@@ -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):