From ea8015e01d7e339042f5062e9db3420142c716c2 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Wed, 9 Nov 2022 09:15:37 +0000 Subject: [PATCH] Update apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt --- .../app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt index 4a09759e29..2e4337ce21 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt @@ -270,12 +270,12 @@ open class ChatController(var ctrl: ChatCtrl?, val ntfManager: NtfManager, val a /** Global [ctrl] can be null. It's needed for having the same [ChatModel] that already made in [ChatController] without the need * to change it everywhere in code after changing a database. * Since it can be changed in background thread, making this check to prevent NullPointerException */ - val ctrl = ctrl - if (ctrl == null) { + val _ctrl = ctrl + if (_ctrl == null) { receiverStarted = false break } - val msg = recvMsg(ctrl) + val msg = recvMsg(_ctrl) if (msg != null) processReceivedMsg(msg) } }