diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 45b866d60dffe..89f273fe75641 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4407,6 +4407,9 @@ util::Result MigrateLegacyToDescriptor(const std::string& walle if (!wallet_path) { return util::Error{util::ErrorString(wallet_path)}; } + if (!fs::exists(*wallet_path)) { + return util::Error{_("Error: Wallet does not exist")}; + } if (!IsBDBFile(BDBDataFile(*wallet_path))) { return util::Error{_("Error: This wallet is already a descriptor wallet")}; }