aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-11 13:54:31 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-23 18:36:53 +0000
commit93e74269b31965505bdcc39e307a94d91b00e2bb (patch)
treec9df6f855e2e5aadb39a52bc92c72077d3b611c2 /src
parentMerge pull request #5973 (diff)
downloadmonero-93e74269b31965505bdcc39e307a94d91b00e2bb.tar.xz
wallet2: error out when we need a daemon password but have no prompt function
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index c7374b896..74b8c02f1 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -385,6 +385,11 @@ std::unique_ptr<tools::wallet2> make_basic(const boost::program_options::variabl
{
auto parsed = tools::login::parse(
command_line::get_arg(vm, opts.daemon_login), false, [password_prompter](bool verify) {
+ if (!password_prompter)
+ {
+ MERROR("Password needed without prompt function");
+ return boost::optional<tools::password_container>();
+ }
return password_prompter("Daemon client password", verify);
}
);