From 5d73f0f963d49148c3cdb7506f4ae4c062515235 Mon Sep 17 00:00:00 2001 From: Michael Jerris <mike@jerris.com> Date: Fri, 3 Aug 2007 03:33:50 +0000 Subject: [PATCH] fix for MODENDP-14. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5550 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_portaudio/mod_portaudio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 20605f9cb3..58f964635d 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -6,7 +6,7 @@ * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * the License. You may obtain a copy of the License ` * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -270,7 +270,9 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) unsigned int pos = 0; switch_core_file_seek(&fh, &pos, 0, SEEK_SET); } - WriteAudioStream(globals.ring_stream, abuf, (long) olen, &globals.timer); + if (globals.ring_stream) { + WriteAudioStream(globals.ring_stream, abuf, (long) olen, &globals.timer); + } } } switch_clear_flag_locked((&globals), GFLAG_RING);