diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -337,7 +337,7 @@ std::string uri; #ifdef ENABLE_WALLET - if (walletID && !walletID->empty()) { + if (walletID) { QByteArray encodedName = QUrl::toPercentEncoding( QString::fromStdString(*walletID)); @@ -484,7 +484,8 @@ } std::string wallet_id = walletID.toStdString(); if (!RPCConsole::RPCExecuteCommandLine( - m_node, result, executableCommand, nullptr, &wallet_id)) { + m_node, result, executableCommand, nullptr, + walletID.isNull() ? nullptr : &wallet_id)) { Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \"")); return; @@ -1051,7 +1052,7 @@ } if (m_last_wallet_id != walletID) { - if (walletID.isEmpty()) { + if (walletID.isNull()) { message(CMD_REQUEST, tr("Executing command without any wallet")); } else {