]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add error checking.
authorMichael Jerris <mike@jerris.com>
Tue, 15 Jan 2008 18:08:47 +0000 (18:08 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 15 Jan 2008 18:08:47 +0000 (18:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7241 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_speech.c

index d5a497527f5176a4a49fb49dfef49f244a5b6f7d..201dfad774980dfbba20921eb1a575d4cda4b7ed 100644 (file)
@@ -47,6 +47,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *
        char buf[256] = "";
        char *param = NULL;
 
+       if (!sh || !flags || switch_strlen_zero(module_name)) {
+               return SWITCH_STATUS_FALSE;
+       }
+
        if (strchr(module_name, ':')) {
                switch_set_string(buf, module_name);
                if ((param = strchr(buf, ':'))) {