]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make session.ready work on uninit session containers
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Jun 2009 19:50:00 +0000 (19:50 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Jun 2009 19:50:00 +0000 (19:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13965 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_cpp.cpp

index c30c638f46b4ebcd3e1287bcccb2fd47a88b14a0..83008c809717119d6af41cdfac63ee603cc86dbb 100644 (file)
@@ -874,7 +874,12 @@ SWITCH_DECLARE(int) CoreSession::sleep(int ms, int sync) {
 SWITCH_DECLARE(bool) CoreSession::ready() {
 
        this_check(false);
-       sanity_check(false);    
+
+       if (!session) {
+               return false;
+       }
+       sanity_check(false);
+
        return switch_channel_ready(channel) != 0;
 }