mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
do not allow clipboard to be nil
we use it as text anyway and test if it is the empty string also. this fixes a crash in viewhtml when holding a selector with an empty clipboard, we try to contcate getClipboardText which is nil (on !SDL & !Android)
This commit is contained in:
@@ -179,7 +179,7 @@ local function initTouchEvents()
|
||||
end
|
||||
end
|
||||
local clipboard_value = Device.input.getClipboardText()
|
||||
local is_clipboard_empty = clipboard_value == nil or clipboard_value == ""
|
||||
local is_clipboard_empty = clipboard_value == ""
|
||||
local clipboard_dialog
|
||||
clipboard_dialog = require("ui/widget/textviewer"):new{
|
||||
title = _("Clipboard"),
|
||||
|
||||
Reference in New Issue
Block a user