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:
yparitcher
2023-08-03 23:57:13 -04:00
parent 493a60faef
commit f3fc2ac353
2 changed files with 4 additions and 4 deletions

View File

@@ -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"),