From b98ee4583bba70e029c568dbef14e81c94d6cba9 Mon Sep 17 00:00:00 2001 From: poire-z Date: Tue, 26 Mar 2019 20:53:37 +0100 Subject: [PATCH] Footnote popups: fix crash when used on some links Fix crash when dismissing the popup when the link was detected as "not coherent". --- frontend/apps/reader/modules/readerlink.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerlink.lua b/frontend/apps/reader/modules/readerlink.lua index b74a8bc27..ccd652c4d 100644 --- a/frontend/apps/reader/modules/readerlink.lua +++ b/frontend/apps/reader/modules/readerlink.lua @@ -1114,7 +1114,9 @@ function ReaderLink:showAsFootnotePopup(link, neglect_current_location) if not self:onTap(arg, ges) then -- If we did tap on another link, onTap has already cleared our -- highlight. If not, call close_callback to unhighlight it. - close_callback(footnote_height) + if close_callback then -- not set if xpointer not coherent + close_callback(footnote_height) + end end end, dialog = self.dialog,