]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
possible fix for FSCORE-575
authorMichael Jerris <mike@jerris.com>
Fri, 21 May 2010 18:40:36 +0000 (14:40 -0400)
committerMichael Jerris <mike@jerris.com>
Fri, 21 May 2010 18:40:36 +0000 (14:40 -0400)
src/mod/endpoints/mod_sofia/sofia_reg.c

index 55b3f314e259b72a4dd4037664b05c07897e4906..9190f9107f8e1096a3fdf2c23fc72ea1fb7c9a03 100644 (file)
@@ -2393,10 +2393,8 @@ sofia_gateway_t *sofia_reg_find_gateway_by_realm__(const char *file, const char
        switch_mutex_lock(mod_sofia_globals.hash_mutex);
        for (hi = switch_hash_first(NULL, mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) {
                switch_hash_this(hi, &var, NULL, &val);
-               if ((gateway = (sofia_gateway_t *) val)) {
-                       if (!strcasecmp(gateway->register_realm, key)) {
-                               break;
-                       }
+               if ((gateway = (sofia_gateway_t *) val) && gateway->register_realm && !strcasecmp(gateway->register_realm, key)) {
+                       break;
                } else {
                        gateway = NULL;
                }