Mercurial > pidgin
changeset 26528:bd61f91e669a
Fix assertion when the blist theme preference is empty.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Fri, 10 Apr 2009 01:32:31 +0000 |
parents | 9a2e4aebfa91 |
children | 8a0797f40695 |
files | pidgin/gtkblist.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Fri Apr 10 01:18:15 2009 +0000 +++ b/pidgin/gtkblist.c Fri Apr 10 01:32:31 2009 +0000 @@ -5505,6 +5505,7 @@ 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 @@ 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);