mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #257 from dpavlin/master
fix crash on documents without TOC
This commit is contained in:
@@ -1738,9 +1738,11 @@ function UniReader:showToc()
|
||||
prev = k
|
||||
prev_depth = self.toc[prev].depth
|
||||
end -- for k,v in ipairs(self.toc)
|
||||
self.toc_curidx_to_x = self.toc_children[0]
|
||||
for i=1,#self.toc_children[0] do
|
||||
table.insert(self.toc_cview, self.toc_xview[self.toc_children[0][i]])
|
||||
if ( self.toc_children[0] ) then
|
||||
self.toc_curidx_to_x = self.toc_children[0]
|
||||
for i=1,#self.toc_children[0] do
|
||||
table.insert(self.toc_cview, self.toc_xview[self.toc_children[0][i]])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user