From 8e24dd3a38309a01b5cfb08eb72f8a0f046d4121 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 8 Dec 2018 11:37:44 +0000 Subject: [PATCH] the menu item reference may not be there, yet --- .../java/net/ktnx/mobileledger/NewTransactionActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java index 6ccbbd0e..28eec693 100644 --- a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java @@ -104,7 +104,7 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal } public void save_transaction() { - mSave.setVisible(false); + if (mSave != null) mSave.setVisible(false); toggle_all_editing(false); progress.setVisibility(View.VISIBLE); @@ -307,9 +307,9 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal } if ((accounts >= 2) && (accounts_with_values >= (accounts - 1))) { - mSave.setVisible(true); + if (mSave != null) mSave.setVisible(true); } else { - mSave.setVisible(false); + if (mSave != null) mSave.setVisible(false); } } -- 2.39.5