changeset 2873:26be84883f91

[gaim-migrate @ 2886] handle weird cases... ? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 11 Dec 2001 08:24:13 +0000
parents 30828b83143d
children 48123cba5a87
files src/protocols/yahoo/yahoo.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Tue Dec 11 07:18:10 2001 +0000
+++ b/src/protocols/yahoo/yahoo.c	Tue Dec 11 08:24:13 2001 +0000
@@ -396,9 +396,11 @@
 				gpointer val = g_hash_table_lookup(yd->hash, name);
 				if (val) {
 					g_free(val);
-					g_hash_table_insert(yd->hash, name, g_strdup(msg));
+					g_hash_table_insert(yd->hash, name,
+							msg ? g_strdup(msg) : g_malloc0(1));
 				} else
-					g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg));
+					g_hash_table_insert(yd->hash, g_strdup(name),
+							msg ? g_strdup(msg) : g_malloc0(1));
 			}
 			break;
 		case 60: /* no clue */
@@ -537,9 +539,11 @@
 			gpointer val = g_hash_table_lookup(yd->hash, name);
 			if (val) {
 				g_free(val);
-				g_hash_table_insert(yd->hash, name, g_strdup(msg));
+				g_hash_table_insert(yd->hash, name,
+						msg ? g_strdup(msg) : g_malloc0(1));
 			} else
-				g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg));
+				g_hash_table_insert(yd->hash, g_strdup(name),
+						msg ? g_strdup(msg) : g_malloc0(1));
 		}
 	}
 }
@@ -771,9 +775,11 @@
 		return "Out To Lunch";
 	case YAHOO_STATUS_STEPPEDOUT:
 		return "Stepped Out";
-	default:
-		return NULL;
+	case YAHOO_STATUS_INVISIBLE:
+		return "Invisible";
 	}
+
+	return "Online";
 }
 
 static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who)