mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-25 17:02:26 +00:00
wallet2_api: check whether dynamic_cast returns NULL
CID 161844
This commit is contained in:
parent
92f2f687b9
commit
44434c8a37
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
|
||||||
bool WalletManagerImpl::closeWallet(Wallet *wallet, bool store)
|
bool WalletManagerImpl::closeWallet(Wallet *wallet, bool store)
|
||||||
{
|
{
|
||||||
WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet);
|
WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet);
|
||||||
|
if (!wallet_)
|
||||||
|
return false;
|
||||||
bool result = wallet_->close(store);
|
bool result = wallet_->close(store);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
m_errorString = wallet_->errorString();
|
m_errorString = wallet_->errorString();
|
||||||
|
|
Loading…
Reference in a new issue