diff --git a/app/src/main/kotlin/at/bitfire/davdroid/ui/setup/SendInviteFragment.kt b/app/src/main/kotlin/at/bitfire/davdroid/ui/setup/SendInviteFragment.kt index 89b7b340bf351d346a20465f87959087f1b5ed8e..2a8ee2ac20eb7e054ffa0beda77286530af53515 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/ui/setup/SendInviteFragment.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/ui/setup/SendInviteFragment.kt @@ -131,7 +131,12 @@ class SendInviteFragment : Fragment() { trimedResult.lastIndexOf(":") + 1, trimedResult.length - 1 ) - return errorCode.toInt() + + return try { + errorCode.toInt() + } catch (e: NumberFormatException) { + -1 + } } private fun handleErrorCode(intCode: Int) {