From: Mathieu Rene Date: Thu, 5 Mar 2009 02:46:00 +0000 (+0000) Subject: Don't crash in the odd event you have no modules loaded X-Git-Tag: v1.0.4~1679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7abd9b3d5ed6e366387dd4e2ed63d79b8074b74a;p=thirdparty%2Ffreeswitch.git Don't crash in the odd event you have no modules loaded git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12430 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 095754051f..620700f418 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1266,6 +1266,10 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void) switch_hash_index_t *hi; void *val; switch_loadable_module_t *module; + + if (!loadable_modules.module_hash) { + return; + } for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) { switch_hash_this(hi, NULL, NULL, &val);