From e1c3d4afb1e5258dc015300c72c6a65788090230 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Jul 2016 08:00:06 +0530 Subject: [PATCH] Book Details: Do not show the "Copy link" context menu item unless there is an actual link at the cursor location. Fixes #1605594 [Comments right click menu](https://bugs.launchpad.net/calibre/+bug/1605594) --- src/calibre/gui2/book_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 6d0775544d..a5ac8f6d17 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -180,7 +180,7 @@ def details_context_menu_event(view, ev, book_info): # {{{ el = r.linkElement() data = el.attribute('data-item') author = el.toPlainText() if unicode(el.attribute('calibre-data')) == u'authors' else None - if not url.startswith('search:'): + if url and not url.startswith('search:'): for a, t in [('copy', _('&Copy Link')), ]: ac = getattr(book_info, '%s_link_action'%a)