aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-05 15:11:37 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-05 15:33:01 +0000
commit4b38400336c2bd5b0d011da980ca9e46862a50b9 (patch)
treef203a3f1c2f747c3b4dfe091f95fd6d9df60d39c
parentMerge pull request #6088 (diff)
downloadmonero-4b38400336c2bd5b0d011da980ca9e46862a50b9.tar.xz
wallet2: don't try to lock an empty filename
-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 7f8b48b8d..6e4a14f49 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -7555,6 +7555,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.");
@@ -7566,6 +7568,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.");
@@ -7577,6 +7581,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();
}