aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/res_jabber.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c
index b47add708..afad72c35 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -383,7 +383,8 @@ static int aji_status_exec(struct ast_channel *chan, void *data)
r = buddy->resources;
if(!r)
ast_log(LOG_NOTICE, "Resource %s of buddy %s not found \n", resource, screenname);
- stat = r->status;
+ else
+ stat = r->status;
sprintf(status, "%d", stat);
pbx_builtin_setvar_helper(chan, variable, status);
return 0;