aboutsummaryrefslogtreecommitdiff
path: root/src/qt/askpassphrasedialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-11-08 21:18:36 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2011-11-08 21:18:36 +0100
commitdead0ff8cd90eb39f1d9278539d2b3579982b3de (patch)
tree566823e2886404bf81b3ee94d99ba03497119590 /src/qt/askpassphrasedialog.cpp
parent0fb0a38339e5cb404147c89f73ff10d962a47ca5 (diff)
Add robustness against null models
Diffstat (limited to 'src/qt/askpassphrasedialog.cpp')
-rw-r--r--src/qt/askpassphrasedialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index a297513a62..89cdf43ba4 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -72,6 +72,8 @@ void AskPassphraseDialog::setModel(WalletModel *model)
void AskPassphraseDialog::accept()
{
std::string oldpass, newpass1, newpass2;
+ if(!model)
+ return;
// TODO: mlock memory / munlock on return so they will not be swapped out, really need "mlockedstring" wrapper class to do this safely
oldpass.reserve(MAX_PASSPHRASE_SIZE);
newpass1.reserve(MAX_PASSPHRASE_SIZE);