summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 9fb1d02..a19cf50 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -267,9 +267,10 @@ class Misc:
def selection_own_get(self, **kw):
"Find owner of X selection."
if not kw.has_key('displayof'): kw['displayof'] = self._w
- return self._nametowidget(
- apply(self.tk.call,
- ('selection', 'own') + self._options(kw)))
+ name = apply(self.tk.call,
+ ('selection', 'own') + self._options(kw))
+ if not name: return None
+ return self._nametowidget(name)
def send(self, interp, cmd, *args):
return apply(self.tk.call, ('send', interp, cmd) + args)
def lower(self, belowThis=None):