ReaderBookmark:renameBookmark: Better nil guard (#8176)

When matching a highlight to a bookmark *really* fails.

(Noticed in the log from #8175)
This commit is contained in:
NiLuJe
2021-09-04 12:02:06 +02:00
committed by GitHub
parent cf1248393c
commit 90d4d22ba6

View File

@@ -621,7 +621,7 @@ function ReaderBookmark:renameBookmark(item, from_highlight)
break
end
end
if bookmark.text == nil then -- bookmark not found
if not bookmark or bookmark.text == nil then -- bookmark not found
return
end
else