From fb426c03fb2ff72d871c98c35eeed810f6e41c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 24 Jul 2022 23:32:56 +0200 Subject: [PATCH] Never update counter label if widget has been removed On Windows it triggers a SIGSEGV. issue11395 review423491003 (grafted from d0764ce2fbebd20fdbcf6177fa51c6f9e3293755) --HG-- branch : 6.0 --- tryton/gui/window/view_form/view/form_gtk/state_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/state_widget.py b/tryton/gui/window/view_form/view/form_gtk/state_widget.py index 87c2317749..a3baa190ee 100644 --- a/tryton/gui/window/view_form/view/form_gtk/state_widget.py +++ b/tryton/gui/window/view_form/view/form_gtk/state_widget.py @@ -193,7 +193,7 @@ class Link(StateMixin, Gtk.Button): counter=counter, label=label)) def _set_count(self, value, idx=0, current=None, counter=None, label=''): - if current != self._current and not self.get_parent(): + if current != self._current or not self.get_parent(): return try: counter[idx] = value()