diff --git a/Cargo.toml b/Cargo.toml index 86e34f87..65ae7e6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "redis-module" -version = "2.0.6" +version = "2.0.7" authors = ["Gavrie Philipson ", "Guy Korland "] edition = "2021" build = "build.rs" diff --git a/src/redismodule.rs b/src/redismodule.rs index 2584aed5..46ed3ec1 100644 --- a/src/redismodule.rs +++ b/src/redismodule.rs @@ -101,6 +101,9 @@ pub fn decode_args( argv: *mut *mut raw::RedisModuleString, argc: c_int, ) -> Vec { + if argv.is_null() { + return Vec::new(); + } unsafe { slice::from_raw_parts(argv, argc as usize) } .iter() .map(|&arg| RedisString::new(NonNull::new(ctx), arg))