adding some null checks

This commit is contained in:
tibbi 2021-10-06 22:38:52 +02:00
parent 8371663878
commit ea9c0eb2d1

View File

@ -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
}