From ea9c0eb2d1c70e1274cb38921ef5e47991cad528 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 6 Oct 2021 22:38:52 +0200 Subject: [PATCH] adding some null checks --- .../kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt index 3746a090..dfc9c380 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt @@ -55,7 +55,7 @@ class CallManager { fun getCallContact(context: Context, callback: (CallContact?) -> Unit) { ensureBackgroundThread { val callContact = CallContact("", "", "") - if (call == null || call!!.details == null || call!!.details!!.handle == null) { + if (call == null || call?.details == null || call?.details?.handle == null) { callback(callContact) return@ensureBackgroundThread }