Never update counter label if widget has been removed

On Windows it triggers a SIGSEGV.

issue11395
review423491003
(grafted from d0764ce2fbebd20fdbcf6177fa51c6f9e3293755)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2022-07-24 23:32:56 +02:00
1 parent 1ae743e7d7
commit fb426c03fb
1 file changed
+1 -1
@@ -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()