From 94207994070ef0990b68006fba1affda06a58cd2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 9 Apr 2009 21:17:52 +0000 Subject: [PATCH] add more specific checks to new macro just to be safe git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12973 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_loadable_module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/switch_loadable_module.h b/src/include/switch_loadable_module.h index 0392583870..f868830efc 100644 --- a/src/include/switch_loadable_module.h +++ b/src/include/switch_loadable_module.h @@ -430,7 +430,7 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po static inline switch_bool_t switch_core_codec_ready(switch_codec_t *codec) { - return (codec->flags & SWITCH_CODEC_FLAG_READY) ? SWITCH_TRUE : SWITCH_FALSE; + return (codec && codec->implementation && (codec->flags & SWITCH_CODEC_FLAG_READY)) ? SWITCH_TRUE : SWITCH_FALSE; }