summaryrefslogtreecommitdiff
path: root/apps/app_directed_pickup.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_directed_pickup.c')
-rw-r--r--apps/app_directed_pickup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 55001abcb..c79bad26f 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -83,7 +83,7 @@ static int pickup_exec(struct ast_channel *chan, void *data)
*context++ = '\0';
/* If the context is the pickup mark, iterate through all channels finding the right origin one */
- if (!strcmp(context, PICKUPMARK)) {
+ if (context && !strcmp(context, PICKUPMARK)) {
while ((origin = ast_channel_walk_locked(origin))) {
if (origin) {
tmp2 = pbx_builtin_getvar_helper(origin, PICKUPMARK);