From ffe087cc3b6bafb583fad697c2a12a2ac647d998 Mon Sep 17 00:00:00 2001 From: Mygod Date: Sun, 9 Aug 2020 16:36:35 -0400 Subject: [PATCH] Fail without crashing the app --- .../main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt index 9a92d087..dd7dd0db 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt @@ -214,7 +214,9 @@ class RepeaterManager(private val parent: TetheringFragment) : Manager(), Servic } catch (e: Exception) { if (e !is CancellationException) Timber.w(e) passphrase = group.passphrase - bssid = group.owner?.deviceAddress?.let(MacAddressCompat.Companion::fromString) + try { + bssid = group.owner?.deviceAddress?.let(MacAddressCompat.Companion::fromString) + } catch (_: IllegalArgumentException) { } this to true } }