aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-05 03:35:03 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-05 03:35:03 +0000
commitea706af7773894b888b67504cef3685fd4935846 (patch)
tree40bd22ab6f47257e298e42bf7da05d4b6081ada8 /res
parent1ded8ba4607164357545110ea71b4ffa1da4c189 (diff)
Don't reference a potentially NULL pointer. (issue #9199 reported by klolik)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@57770 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-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 414f5c5bc..2cda2d9ee 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;