From 209a7ea1d89b16b8eb3e3335c7af8aa9c6821cba Mon Sep 17 00:00:00 2001 From: Jayant-Kernel Date: Sun, 5 Apr 2026 11:16:01 +0530 Subject: [PATCH] template_manager: fix crash on double-click on a running qube table_double_click() unconditionally called .isChecked() on the State column widget, but running qubes have no checkbox there (cellWidget returns None), causing an AttributeError crash. Move the column guard check before the cellWidget call, and bail out early if there is no checkbox (i.e. the qube is running). Fixes: https://github.com/QubesOS/qubes-issues/issues/10817 --- qubesmanager/template_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qubesmanager/template_manager.py b/qubesmanager/template_manager.py index 34ee4d0e..e974cc98 100644 --- a/qubesmanager/template_manager.py +++ b/qubesmanager/template_manager.py @@ -201,12 +201,15 @@ def change_all_changed(self): def table_double_click(self, row, column): template_column = column_names.index('Current template') - current_state = self.vm_list.cellWidget( - row, column_names.index('State')).isChecked() if column != template_column: return + checkbox = self.vm_list.cellWidget(row, column_names.index('State')) + if not checkbox: + return + current_state = checkbox.isChecked() + template_name = self.vm_list.item(row, column).text() for row_number in range(0, self.vm_list.rowCount()):