Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dnd.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-17 10:15:41 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-17 10:15:41 (GMT)
commit198c4ff08f909ecd0687f77a2885e58dd769cb4c (patch)
treee460d0165e60c3d2d0ef7bb6df6dd6b9ddf3594a /dnd.py
parent2d9b0b677864f01141a80fbabeae7ed184f62631 (diff)
Don't stacktrace when an event is not passed to onCopyOrDrag, just ignore it.
Diffstat (limited to 'dnd.py')
-rw-r--r--dnd.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/dnd.py b/dnd.py
index 996a961..9f94a02 100644
--- a/dnd.py
+++ b/dnd.py
@@ -77,6 +77,10 @@ class DragDropHooks:
return False
def onCopyOrDrag(self, event, trans):
+ if not event:
+ logging.warning('DragDropHooks.onCopyOrDrag: no event received.')
+ return True
+
mouse_event = event.queryInterface(interfaces.nsIDOMMouseEvent)
event_target = mouse_event.target
target_node = event_target.queryInterface(interfaces.nsIDOMNode)