mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderPaging:onRestoreBookLocation Do not restore nil location
it can pe passed a nil / empty table if the location stack is empty, return early in this case. Fixes: #12869
This commit is contained in:
@@ -596,6 +596,9 @@ function ReaderPaging:getBookLocation()
|
||||
end
|
||||
|
||||
function ReaderPaging:onRestoreBookLocation(saved_location)
|
||||
if not saved_location or not saved_location[1] then
|
||||
return
|
||||
end
|
||||
if self.view.page_scroll then
|
||||
if self.view:restoreViewContext(saved_location) then
|
||||
self:_gotoPage(saved_location[1].page, "scrolling")
|
||||
|
||||
Reference in New Issue
Block a user