]> git.ktnx.net Git - mobile-ledger.git/commitdiff
the menu item reference may not be there, yet
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 11:37:44 +0000 (11:37 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 11:37:44 +0000 (11:37 +0000)
app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java

index 6ccbbd0efb1d8ee1caffec2d3d35783bfa6ea90d..28eec69375924e63acd0b6d167b717de80964984 100644 (file)
@@ -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);
         }
     }