pidgin: 8c5b1d77: Fix assertion when the blist theme prefe...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Thu Apr 9 21:35:35 EDT 2009


-----------------------------------------------------------------
Revision: 8c5b1d77b08657a2e236e8efe9bc2920f763911e
Ancestor: 20e4d365377af2c56b6b2f2e48b8034d55ee684a
Author: maiku at soc.pidgin.im
Date: 2009-04-10T01:32:31
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8c5b1d77b08657a2e236e8efe9bc2920f763911e

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

Fix assertion when the blist theme preference is empty.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	441e0954ce32a74d88167a0b588ea3202b9b39f1
+++ pidgin/gtkblist.c	805acaf8f242e7b5271fc70a0fc0b5c92e8ff368
@@ -5505,6 +5505,7 @@ static void pidgin_blist_show(PurpleBudd
 	GtkWidget *sep;
 	GtkWidget *label;
 	char *pretty, *tmp;
+	const char *theme_name;
 	GtkAccelGroup *accel_group;
 	GtkTreeSelection *selection;
 	GtkTargetEntry dte[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
@@ -5523,7 +5524,11 @@ static void pidgin_blist_show(PurpleBudd
 	gtkblist = PIDGIN_BLIST(list);
 	priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
 
-	priv->current_theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme"), "blist"));
+	theme_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme");
+	if (theme_name && *theme_name)
+		priv->current_theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(theme_name, "blist"));
+	else
+		priv->current_theme = NULL;
 
 	gtkblist->empty_avatar = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32);
 	gdk_pixbuf_fill(gtkblist->empty_avatar, 0x00000000);


More information about the Commits mailing list