From: Damyan Ivanov Date: Sat, 8 Dec 2018 11:37:44 +0000 (+0000) Subject: the menu item reference may not be there, yet X-Git-Tag: v0.3~290 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=8e24dd3a38309a01b5cfb08eb72f8a0f046d4121 the menu item reference may not be there, yet --- 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); } }