summaryrefslogtreecommitdiff
path: root/impls/monero.rs/src
diff options
context:
space:
mode:
Diffstat (limited to 'impls/monero.rs/src')
-rw-r--r--impls/monero.rs/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/impls/monero.rs/src/lib.rs b/impls/monero.rs/src/lib.rs
index b50b8f2..2f08cd9 100644
--- a/impls/monero.rs/src/lib.rs
+++ b/impls/monero.rs/src/lib.rs
@@ -85,6 +85,10 @@ impl WalletManager {
/// std::fs::remove_file(format!("{}.keys", wallet_str)).expect("Failed to delete test wallet keys");
/// ```
pub fn get_status(&self, wallet_ptr: *mut c_void) -> WalletResult<()> {
+ if wallet_ptr.is_null() {
+ return Err(WalletError::NullPointer); // Ensure NullPointer is returned for null wallet
+ }
+
unsafe {
let status = bindings::MONERO_Wallet_status(wallet_ptr);
if status == bindings::WalletStatus_Ok {