]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_valet_parking] Do not crash when exit key is not defined
authorBrian West <brian@freeswitch.org>
Thu, 3 Sep 2020 18:07:15 +0000 (13:07 -0500)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:01:15 +0000 (22:01 +0300)
src/mod/applications/mod_valet_parking/mod_valet_parking.c

index 1b088ec957edf84ca4e48672da7424d7bfe2577c..c304cad8240b4c313c76fcd798ef2358b67842db 100644 (file)
@@ -89,7 +89,7 @@ static switch_status_t valet_on_dtmf(switch_core_session_t *session, void *input
                        switch_channel_t *channel = switch_core_session_get_channel(session);
                        switch_dtmf_t *exit_key_pvt = (switch_dtmf_t *) switch_channel_get_private(channel, "_orbit_exit_key_");
 
-                       if (dtmf->digit == exit_key_pvt->digit) {
+                       if (exit_key_pvt && dtmf->digit == exit_key_pvt->digit) {
                                const char *dp;
                                const char *exten;
                                const char *context;