readerfooter(minor): just incase self.pages is nil

This commit is contained in:
Qingping Hou
2016-04-20 21:49:33 -07:00
parent 572412b1f6
commit 0226efc4cd
2 changed files with 2 additions and 2 deletions

View File

@@ -295,7 +295,7 @@ function ReaderFooter:updateFooterText()
if #ticks_candidates > 0 then
self.progress_bar.ticks = ticks_candidates[1]
self.progress_bar.last = self.pages
self.progress_bar.last = self.pages or self.view.document:getPageCount()
else
-- we still set ticks here so self.progress_bar.ticks will not be
-- initialized again if ticks_candidates is empty