From 067a23e6a522d1ef5992ecb53c2ed70b2f8ef8d3 Mon Sep 17 00:00:00 2001 From: m2049r Date: Tue, 20 Oct 2020 23:40:55 +0200 Subject: [PATCH] fix crash if back before new address is generated --- app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java b/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java index 41fdfcf8..0636a4ac 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java @@ -610,6 +610,8 @@ public class ReceiveFragment extends Fragment { super.onPostExecute(result); if (dialogOpened) progressCallback.dismissProgressDialog(); + if (!isAdded()) // never mind then + return; tvAddress.setText(newSubaddress); tvAddressLabel.setText(getString(R.string.generate_address_label_sub, wallet.getNumSubaddresses() - 1));