From 04d1d23c2f6207a74d447c5633ad07740bb6df81 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Sat, 21 Aug 2021 15:54:31 +0200 Subject: [PATCH] [plugin] OPDS: prevent crash if link.type is nil (#8111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It can happen… somewhere, while clicking around http://arxiv.maplepop.com/catalog a bit. (The magical crash/bug finder from .) --- plugins/opds.koplugin/opdsbrowser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/opds.koplugin/opdsbrowser.lua b/plugins/opds.koplugin/opdsbrowser.lua index e53bd1ff9..0398b7626 100644 --- a/plugins/opds.koplugin/opdsbrowser.lua +++ b/plugins/opds.koplugin/opdsbrowser.lua @@ -440,7 +440,7 @@ function OPDSBrowser:genItemTableFromCatalog(catalog, item_url, username, passwo item.acquisitions = {} if entry.link then for _, link in ipairs(entry.link) do - if link.type:find(self.catalog_type) + if link.type and link.type:find(self.catalog_type) and (not link.rel or link.rel == "subsection" or link.rel == "http://opds-spec.org/subsection"