From 062bd733da883d76d3625fb38c71f2bd74c363a1 Mon Sep 17 00:00:00 2001 From: Mark Nunberg Date: Tue, 23 Jan 2018 10:49:18 -0500 Subject: [PATCH] redismodule.h: Check ModuleNameBusy before calling it Older versions might not have this function. --- src/redismodule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redismodule.h b/src/redismodule.h index 374cde7f0..09d681c27 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -374,7 +374,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int REDISMODULE_GET_API(AbortBlock); #endif - if (RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR; + if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR; RedisModule_SetModuleAttribs(ctx,name,ver,apiver); return REDISMODULE_OK; }