Test if parent_focus exists before using it

issue2110
This commit is contained in:
Cédric Krier committed 2011-08-02 12:38:45 +02:00
1 parent 45adb89e9c
commit 9a6cb5ea29
1 file changed
+2 -1
+2 -1
View File
@@ -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()