diff options
Diffstat (limited to 'res/res_calendar.c')
-rw-r--r-- | res/res_calendar.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_calendar.c b/res/res_calendar.c index f279e73a0..e6c93fdc7 100644 --- a/res/res_calendar.c +++ b/res/res_calendar.c @@ -1685,6 +1685,11 @@ static int calendar_event_read(struct ast_channel *chan, const char *cmd, char * struct ast_datastore *datastore; struct ast_calendar_event *event; + if (!chan) { + ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd); + return -1; + } + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "%s requires an argument\n", cmd); return -1; |