[fix] Crash on highlight in some situations (#3306)

This commit is contained in:
poire-z
2017-10-06 15:58:58 +02:00
committed by Frans de Jonge
parent b483c54be8
commit b7785753c6

View File

@@ -402,7 +402,9 @@ function ReaderHighlight:onHoldRelease()
callback = function()
UIManager:scheduleIn(0.1, function()
self:lookupWikipedia()
self:onClose()
-- We don't call self:onClose(), we need the highlight
-- to still be there, as we may Highlight it from the
-- dict lookup widget
end)
end,
},
@@ -410,7 +412,7 @@ function ReaderHighlight:onHoldRelease()
text = _("Dictionary"),
callback = function()
self:onHighlightDictLookup()
self:onClose()
-- We don't call self:onClose(), same reason as above
end,
},
},