changeset 14689:b7754ba03aa8

[gaim-migrate @ 17441] Fix Coverity CID 115 - "last_updated_utf8_string" may be NULL committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 07 Oct 2006 17:15:58 +0000
parents 37bb5e487347
children 97df6766c945
files libgaim/protocols/yahoo/yahoo_profile.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/yahoo/yahoo_profile.c	Sat Oct 07 17:09:14 2006 +0000
+++ b/libgaim/protocols/yahoo/yahoo_profile.c	Sat Oct 07 17:15:58 2006 +0000
@@ -1167,15 +1167,17 @@
 		}
 	}
 
-	/* see if Member Since is there, and if so, extract it. */
-	found |= gaim_markup_extract_info_field(stripped, stripped_len, s,
-			"Member Since:", 1, last_updated_utf8_string,
-			'\n', NULL, _("Member Since"), 0, NULL, yahoo_info_date_reformat);
+	if (last_updated_utf8_string != NULL) {
+		/* see if Member Since is there, and if so, extract it. */
+		found |= gaim_markup_extract_info_field(stripped, stripped_len, s,
+				"Member Since:", 1, last_updated_utf8_string,
+				'\n', NULL, _("Member Since"), 0, NULL, yahoo_info_date_reformat);
 
-	/* extract the Last Updated date and put it in */
-	found |= gaim_markup_extract_info_field(stripped, stripped_len, s,
-			last_updated_utf8_string, 1, " ", '\n', NULL,
-			_("Last Update"), 0, NULL, yahoo_info_date_reformat);
+		/* extract the Last Updated date and put it in */
+		found |= gaim_markup_extract_info_field(stripped, stripped_len, s,
+				last_updated_utf8_string, 1, " ", '\n', NULL,
+				_("Last Update"), 0, NULL, yahoo_info_date_reformat);
+	}
 	} /* if (profile_state == PROFILE_STATE_DEFAULT) */
 
 	if(!found)