From: Joshua Colp Date: Mon, 5 Mar 2007 03:35:03 +0000 (+0000) Subject: Don't reference a potentially NULL pointer. (issue #9199 reported by klolik) X-Git-Tag: 1.4.2~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a00f75604b3c8a547c0c505dfcca4551f627dfd8;p=thirdparty%2Fasterisk.git Don't reference a potentially NULL pointer. (issue #9199 reported by klolik) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@57770 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_jabber.c b/res/res_jabber.c index 414f5c5bca..2cda2d9eed 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;