]> git.ktnx.net Git - mobile-ledger.git/commitdiff
avoid crash when there is no information about focused element
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 28 Feb 2021 16:55:00 +0000 (18:55 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 1 Mar 2021 06:00:42 +0000 (06:00 +0000)
observed when sending the transaction to the backend throws an exception

app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java

index 470467d403387c836d9cbd532ac5bb1f69a73488..4274a99b2620f4d825616a4c4604061a8330fef9 100644 (file)
@@ -209,7 +209,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
                          }
                          ignoreFocusChanges = true;
                          try {
-                             if (((focusInfo == null) ||
+                             if (((focusInfo == null) || (focusInfo.element == null) ||
                                   focusInfo.position != getAdapterPosition()) ||
                                  itemView.hasFocus())
                                  return;