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:
1 parent
f4a385a6be
commit
92de0759ed
1 file changed
+3
@@ -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