mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
KoptInterface:getWordFromBoxes: guard against nil boxes (#6827)
Fixes #6825
This commit is contained in:
@@ -799,7 +799,7 @@ end
|
||||
Get word and word box around `pos`.
|
||||
--]]
|
||||
function KoptInterface:getWordFromBoxes(boxes, pos)
|
||||
if not pos or #boxes == 0 then return {} end
|
||||
if not pos or not boxes or #boxes == 0 then return {} end
|
||||
local i, j = getWordBoxIndices(boxes, pos)
|
||||
local lb = boxes[i]
|
||||
local wb = boxes[i][j]
|
||||
|
||||
Reference in New Issue
Block a user