From a2458fcc79ef3b0f33a2968b56bed7d28064285b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 2 Mar 2012 14:09:48 +0100 Subject: [PATCH] Fix delayed call to _record_modified As it is called via idle_add, the form could have been destroyed in the meantime. --- tryton/gui/window/form.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index 0567c40418..27bef97484 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -479,7 +479,10 @@ class Form(SignalEvent, TabContent): self.activate_save() def _record_modified(self, screen, signal_data): - self.activate_save() + # As it is called via idle_add, the form could have been destroyed in + # the meantime. + if screen == self.screen: + self.activate_save() def _record_saved(self, screen, signal_data): self.activate_save()