summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-03-05 03:39:32 +0000
committerJoshua Colp <jcolp@digium.com>2007-03-05 03:39:32 +0000
commit0fb8d82f18ee154fc85228fda85a51365e6eed47 (patch)
treeeddd409c477aada356b57c7d48d691391d462349
parentaabe0abaee332190231fae8484d7f0bf9093d8b5 (diff)
Merged revisions 57770 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r57770 | file | 2007-03-04 22:35:03 -0500 (Sun, 04 Mar 2007) | 2 lines Don't reference a potentially NULL pointer. (issue #9199 reported by klolik) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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;