From 654cc8a77908c3e4af34da03c641b4c380553a89 Mon Sep 17 00:00:00 2001 From: kahverengi Date: Sat, 1 Jun 2024 22:11:39 +0300 Subject: [PATCH] fix: fix crash due to empty hash list --- .../com/panomc/platform/db/implementation/AddonHashDaoImpl.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Pano/src/main/kotlin/com/panomc/platform/db/implementation/AddonHashDaoImpl.kt b/Pano/src/main/kotlin/com/panomc/platform/db/implementation/AddonHashDaoImpl.kt index 564b4c9..bd73f18 100755 --- a/Pano/src/main/kotlin/com/panomc/platform/db/implementation/AddonHashDaoImpl.kt +++ b/Pano/src/main/kotlin/com/panomc/platform/db/implementation/AddonHashDaoImpl.kt @@ -55,6 +55,10 @@ class AddonHashDaoImpl : AddonHashDao() { ): Map { var listText = "" + if (hashList.isEmpty()) { + return mapOf() + } + hashList.forEach { hash -> if (listText == "") listText = "'$hash'"