From 9a6cb5ea29973a7399b0a45dad542cfb9e5c6096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Aug 2011 12:38:45 +0200 Subject: [PATCH] Test if parent_focus exists before using it issue2110 --- tryton/gui/window/nomodal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/nomodal.py b/tryton/gui/window/nomodal.py index 41734bf714..ef0b208c64 100644 --- a/tryton/gui/window/nomodal.py +++ b/tryton/gui/window/nomodal.py @@ -24,4 +24,5 @@ class NoModal(object): self.page.dialogs.remove(self) self.sensible_widget.props.sensitive = True self.parent.present() - self.parent_focus.grab_focus() + if self.parent_focus: + self.parent_focus.grab_focus()