changeset 13098:44a4bd35cc97

[gaim-migrate @ 15460] Fix an assertion failure. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 19:14:54 +0000
parents f1bf8989bbf2
children 913e06e4155c
files src/gtkstatusbox.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Thu Feb 02 18:48:32 2006 +0000
+++ b/src/gtkstatusbox.c	Thu Feb 02 19:14:54 2006 +0000
@@ -511,7 +511,7 @@
 	{
 		GaimSavedStatus *saved = cur->data;
 		const gchar *message;
-		gchar *stripped;
+		gchar *stripped = NULL;
 
 		/* Get an appropriate status icon */
 		pixbuf = gaim_gtk_create_gaim_icon_with_status(gaim_savedstatus_get_type(saved),
@@ -524,13 +524,15 @@
 			 * API returns the message when gaim_savedstatus_get_title() is
 			 * called, so we don't need to get the message a second time.
 			 */
-			stripped = NULL;
 		}
 		else
 		{
 			message = gaim_savedstatus_get_message(saved);
-			stripped = gaim_markup_strip_html(message);
-			gaim_util_chrreplace(stripped, '\n', ' ');
+			if (message != NULL)
+			{
+				stripped = gaim_markup_strip_html(message);
+				gaim_util_chrreplace(stripped, '\n', ' ');
+			}
 
 			/* Overlay a disk in the bottom left corner */
 			emblem = gtk_widget_render_icon(GTK_WIDGET(statusbox->vbox),