diff --git a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt index 0ae56e76..48f2ed7f 100644 --- a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt +++ b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt @@ -214,7 +214,9 @@ open class BankIconFinder : IBankIconFinder { val candidateUri = URI.create(urlCandidate.replace("onlinebanking-", "")) val candidateHost = candidateUri.host - return bankNameParts.filter { part -> candidateHost.contains(part, true) }.size + if (candidateHost != null) { + return bankNameParts.filter { part -> candidateHost.contains(part, true) }.size + } } catch (e: Exception) { log.warn("Could not find host of url '$urlCandidate' in bank name $bankNameParts'", e) }