From 81b79299ea03fff1cafea0a0b693796be47e4873 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 9 Jun 2026 19:21:56 +0200 Subject: [PATCH] fix: _run_bench crashes when Engines tab was never opened (v2.1.2) _stt_commit() accesses self.stt_name which only exists after the Engines tab is lazily built. Guard with hasattr so running a benchmark directly from the Benchmark tab no longer throws AttributeError. Co-Authored-By: Claude Sonnet 4.6 --- linux/blitztext/__init__.py | 2 +- linux/blitztext/gtksettings.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/blitztext/__init__.py b/linux/blitztext/__init__.py index 22052eb..85d6375 100644 --- a/linux/blitztext/__init__.py +++ b/linux/blitztext/__init__.py @@ -6,4 +6,4 @@ counterpart to the macOS Blitztext menu bar app: it runs natively on the host (not in a container) so it can type into any application via xdotool. """ -__version__ = "2.1.1" +__version__ = "2.1.2" diff --git a/linux/blitztext/gtksettings.py b/linux/blitztext/gtksettings.py index 2b5cc91..0a967e5 100644 --- a/linux/blitztext/gtksettings.py +++ b/linux/blitztext/gtksettings.py @@ -2073,7 +2073,8 @@ notebook.bt-nb tab:checked label { return reference = Path(refp).read_text(errors="replace") self.bench_store.clear() - self._stt_commit() + if hasattr(self, "stt_name"): # only if Engines tab has been built + self._stt_commit() # Filter to checked engines (deduplicate by name as safety net) checks = getattr(self, "_bench_checks", {})