提交 94207994 authored 作者: Anthony Minessale's avatar Anthony Minessale

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
上级 258efd37
...@@ -430,7 +430,7 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po ...@@ -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) 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;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论