From 22f3e188b1d4396e68e1beee562a7f44c1828ce7 Mon Sep 17 00:00:00 2001 From: LooKeR Date: Wed, 13 Oct 2021 14:44:32 +0530 Subject: [PATCH] Fixed Crash on adding repo --- .../com/looker/droidify/screen/EditRepositoryFragment.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/looker/droidify/screen/EditRepositoryFragment.kt b/src/main/kotlin/com/looker/droidify/screen/EditRepositoryFragment.kt index 9aa210fa..5991fd73 100644 --- a/src/main/kotlin/com/looker/droidify/screen/EditRepositoryFragment.kt +++ b/src/main/kotlin/com/looker/droidify/screen/EditRepositoryFragment.kt @@ -474,8 +474,9 @@ class EditRepositoryFragment() : ScreenFragment() { .observeOn(AndroidSchedulers.mainThread()) .subscribe { result, throwable -> checkDisposable = null - throwable.printStackTrace() - val resultAddress = if (result.isEmpty()) address else result + throwable?.printStackTrace() + val resultAddress = + result?.let { if (it.isEmpty()) null else it } ?: address val allow = resultAddress == address || run { layout.address.setText(resultAddress) invalidateAddress(resultAddress)