]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add more specific checks to new macro just to be safe
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Apr 2009 21:17:52 +0000 (21:17 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Apr 2009 21:17:52 +0000 (21:17 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12973 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_loadable_module.h

index 03925838700c0780036bd5c7d7c8d8f76b43280f..f868830efc591ca8d71fe65651912f504ee4c56a 100644 (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;
 }