mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Bookmarks: avoid possible crash
(Not sure how and with what this check works and if we still get such kind of items, but avoid a crash when item2.pos0 exists but item1.pos0 does not.)
This commit is contained in:
@@ -391,7 +391,8 @@ end
|
||||
function ReaderBookmark:isBookmarkSame(item1, item2)
|
||||
if item1.notes ~= item2.notes then return false end
|
||||
if self.ui.document.info.has_pages then
|
||||
return item2.pos0 and item2.pos1 and item1.pos0.page == item2.pos0.page
|
||||
return item1.pos0 and item1.pos1 and item2.pos0 and item2.pos1
|
||||
and item1.pos0.page == item2.pos0.page
|
||||
and item1.pos0.x == item2.pos0.x and item1.pos0.y == item2.pos0.y
|
||||
and item1.pos1.x == item2.pos1.x and item1.pos1.y == item2.pos1.y
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user