From 36c60d02bbb470f5ec157fde95bf85a7a1362efb Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 15 Apr 2009 16:45:40 +0000 Subject: [PATCH] prevent endless loop (just in case) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13034 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_opal/mod_opal.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod/endpoints/mod_opal/mod_opal.cpp b/src/mod/endpoints/mod_opal/mod_opal.cpp index ce58761310..dd2ba1e712 100644 --- a/src/mod/endpoints/mod_opal/mod_opal.cpp +++ b/src/mod/endpoints/mod_opal/mod_opal.cpp @@ -1259,6 +1259,9 @@ switch_status_t FSMediaStream::read_frame(switch_frame_t **frame, switch_io_flag */ while(!GetPatch()) { + if (!m_fsChannel || !switch_channel_up(m_fsChannel)) { + return SWITCH_STATUS_FALSE; + } switch_cond_next(); } if (CheckPatchAndLock()) {