diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-10 11:48:52 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-25 15:48:27 +0100 |
commit | 44434c8a3770fbbcd75334c74b32b0b0df8bcaaa (patch) | |
tree | ab8a780f9129548c547f64895bf77d43b4d2630e /src/wallet | |
parent | core: check return value from parse_hexstr_to_binbuff (diff) | |
download | monero-44434c8a3770fbbcd75334c74b32b0b0df8bcaaa.tar.xz |
wallet2_api: check whether dynamic_cast returns NULL
CID 161844
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/wallet_manager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index 4b988a417..897137d35 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -105,6 +105,8 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path, bool WalletManagerImpl::closeWallet(Wallet *wallet, bool store) { WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet); + if (!wallet_) + return false; bool result = wallet_->close(store); if (!result) { m_errorString = wallet_->errorString(); |