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
This commit is contained in:
Anthony Minessale 2009-04-09 21:17:52 +00:00
parent 258efd37c0
commit 9420799407

View File

@ -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;
}