From 003394c671cc75aefad1cafeb5c2fc6021d2cd04 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 4 Mar 2013 11:12:58 +0530 Subject: [PATCH] ... --- src/calibre/gui2/bars.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/bars.py b/src/calibre/gui2/bars.py index 8c2b527d62..cf9271924f 100644 --- a/src/calibre/gui2/bars.py +++ b/src/calibre/gui2/bars.py @@ -124,9 +124,11 @@ class ToolBar(QToolBar): # {{{ if iac.accepts_drops: aa = iac.qaction w = self.widgetForAction(aa) + m = aa.menu() func = getattr(iac, func) if (( (w is not None and w.geometry().contains(pos)) or - aa.menu().geometry().contains(pos)) and func(event, md)): + (m is not None and m.geometry().contains(pos)) ) and + func(event, md)): return True return False