]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 8 Oct 2008 16:04:39 +0000 (16:04 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 8 Oct 2008 16:04:39 +0000 (16:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9893 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_loopback/mod_loopback.c

index 56015a3c5b2b1afb7ba66b7a6008fde478e7f33d..c28642719ef2820bc3ac0f5e2b2b96ee14ba0f08 100644 (file)
@@ -332,8 +332,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
                switch_clear_flag_locked(tech_pvt->other_tech_pvt, TFLAG_LINKED);
        }
        
-       switch_channel_hangup(tech_pvt->other_channel, switch_channel_get_cause(channel));
-       switch_core_session_rwunlock(tech_pvt->other_session);
+       if (tech_pvt->other_session) {
+               switch_channel_hangup(tech_pvt->other_channel, switch_channel_get_cause(channel));
+               switch_core_session_rwunlock(tech_pvt->other_session);
+       }
 
        return SWITCH_STATUS_SUCCESS;
 }