From: Anthony Minessale Date: Thu, 9 Apr 2009 21:17:52 +0000 (+0000) Subject: add more specific checks to new macro just to be safe X-Git-Tag: v1.0.4~1216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94207994070ef0990b68006fba1affda06a58cd2;p=thirdparty%2Ffreeswitch.git 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 --- 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; }