changeset 13491:0dbab0e08f2a

[gaim-migrate @ 15867] gaim_find_buddy() can return NULL. Resolves CID 98 committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 13 Mar 2006 17:52:37 +0000
parents 40c5d0508a1a
children 59ea9ddd408b
files plugins/log_reader.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/log_reader.c	Sun Mar 12 21:09:16 2006 +0000
+++ b/plugins/log_reader.c	Mon Mar 13 17:52:37 2006 +0000
@@ -694,8 +694,6 @@
 	 * then tweak the blist.xml file by hand if need be. This would be the case if two
 	 * buddies have the same username at different domains. One set of logs would get
 	 * detected for both buddies.
-	 *
-	 * I can't think of how buddy would be NULL.
 	 */
 	if (buddy && logfile) {
 		gaim_blist_node_set_string(&buddy->node, "log_reader_msn_log_filename", logfile);
@@ -1418,7 +1416,7 @@
 						g_string_append(formatted, "</b>");
 						footer = NULL;
 					} else if (strstr(line, " signed off ")) {
-						if (buddy->alias)
+						if (buddy != NULL && buddy->alias)
 							g_string_append_printf(formatted,
 								_("%s has signed off."), buddy->alias);
 						else
@@ -1426,7 +1424,7 @@
 								_("%s has signed off."), log->name);
 						line = "";
 					} else if (strstr(line, " signed on ")) {
-						if (buddy->alias)
+						if (buddy != NULL && buddy->alias)
 							g_string_append(formatted, buddy->alias);
 						else
 							g_string_append(formatted, log->name);
@@ -1484,7 +1482,7 @@
 						footer = "</span></b>";
 					}
 				} else if (g_str_has_prefix(line, data->their_nickname)) {
-					if (buddy->alias) {
+					if (buddy != NULL && buddy->alias) {
 						line += strlen(data->their_nickname) + 2;
 						g_string_append_printf(formatted,
 							"<span style=\"color: #A82F2F;\">"