changeset 13442:5de8bf62b8ef

[gaim-migrate @ 15817] fix CID 74, and CID 37 (which could never happen, if I understand the code correctly) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 07 Mar 2006 08:02:32 +0000
parents f3768fab10bd
children d973e6ba65ac
files src/desktopitem.c src/protocols/jabber/presence.c
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/desktopitem.c	Tue Mar 07 07:55:42 2006 +0000
+++ b/src/desktopitem.c	Tue Mar 07 08:02:32 2006 +0000
@@ -723,7 +723,7 @@
 			char *p;
 			/* Whack C locale */
 			p = strchr (k, '[');
-			*p = '\0';
+			if(p) *p = '\0';
 			g_free (locale);
 		} else if (locale != NULL) {
 			char *p, *brace;
--- a/src/protocols/jabber/presence.c	Tue Mar 07 07:55:42 2006 +0000
+++ b/src/protocols/jabber/presence.c	Tue Mar 07 08:02:32 2006 +0000
@@ -609,12 +609,12 @@
 {
 	const char *status_id = NULL;
 
-	*state = JABBER_BUDDY_STATE_UNKNOWN;
-	*msg = NULL;
-	*priority = 0;
+	if(state) *state = JABBER_BUDDY_STATE_UNKNOWN;
+	if(msg) *msg = NULL;
+	if(priority) *priority = 0;
 
 	if(!status) {
-		*state = JABBER_BUDDY_STATE_UNAVAILABLE;
+		if(state) *state = JABBER_BUDDY_STATE_UNAVAILABLE;
 	} else {
 		if(state) {
 			status_id = gaim_status_get_id(status);
@@ -631,5 +631,4 @@
 		if(priority)
 			*priority = gaim_status_get_attr_int(status, "priority");
 	}
-
 }