From 59480b8369cfb10353eb0e6553fd7a1f46cb6f4b Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Mon, 5 Sep 2016 11:20:54 +0200 Subject: [PATCH] add debugging code for null ref exception --- src/keepass2android/PasswordActivity.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 99f1de8c..f5c7c33a 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -1390,10 +1390,16 @@ namespace keepass2android private void PerformLoadDatabaseWithCompositeKey(CompositeKey compositeKey) { CheckBox cbQuickUnlock = (CheckBox) FindViewById(Resource.Id.enable_quickunlock); + if (cbQuickUnlock == null) + throw new NullPointerException("cpQuickUnlock"); App.Kp2a.SetQuickUnlockEnabled(cbQuickUnlock.Checked); if (App.Kp2a.OfflineMode != _loadDbTaskOffline) { + if (_loadDbTask == null) + throw new NullPointerException("_loadDbTask"); + if (App.Kp2a == null) + throw new NullPointerException("App.Kp2a"); //keep the loading result if we loaded in online-mode (now offline) and the task is completed if (!App.Kp2a.OfflineMode || !_loadDbTask.IsCompleted) {