[fix] OPDS crash with fewer than 4 servers (#5092)

Regression introduced in <https://github.com/koreader/koreader/pull/4249>.

Fixes <https://github.com/koreader/koreader/issues/5091>.
pull/5094/head
Frans de Jonge 5 years ago committed by GitHub
parent a791a7df56
commit fca51757af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -89,7 +89,7 @@ function OPDSBrowser:init()
},
}
G_reader_settings:saveSetting("opds_servers", servers)
elseif servers[4].title == "Internet Archive" and servers[4].url == "http://bookserver.archive.org/catalog/" then
elseif servers[4] and servers[4].title == "Internet Archive" and servers[4].url == "http://bookserver.archive.org/catalog/" then
servers[4].url = "https://bookserver.archive.org"
end
self.item_table = self:genItemTableFromRoot()

Loading…
Cancel
Save