aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-02-06 00:33:17 -0800
committerAlexander Blair <snipa@jagtech.io>2020-02-06 00:33:18 -0800
commit995f34b538515ed1bcc278b58408545887a37a47 (patch)
tree1fb6c46f5a3dbd9d684ca2ac9480ed17f795f784
parentMerge pull request #6102 (diff)
parentwallet2: don't try to lock an empty filename (diff)
downloadmonero-995f34b538515ed1bcc278b58408545887a37a47.tar.xz
Merge pull request #6103
4b384003 wallet2: don't try to lock an empty filename (moneromooo-monero)
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index b39762b4f..870aa65ac 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -7576,6 +7576,8 @@ bool wallet2::is_output_blackballed(const std::pair<uint64_t, uint64_t> &output)
bool wallet2::lock_keys_file()
{
+ if (m_wallet_file.empty())
+ return true;
if (m_keys_file_locker)
{
MDEBUG(m_keys_file << " is already locked.");
@@ -7587,6 +7589,8 @@ bool wallet2::lock_keys_file()
bool wallet2::unlock_keys_file()
{
+ if (m_wallet_file.empty())
+ return true;
if (!m_keys_file_locker)
{
MDEBUG(m_keys_file << " is already unlocked.");
@@ -7598,6 +7602,8 @@ bool wallet2::unlock_keys_file()
bool wallet2::is_keys_file_locked() const
{
+ if (m_wallet_file.empty())
+ return false;
return m_keys_file_locker->locked();
}