aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-folder-title-bar.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-22 04:18:49 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-22 04:18:49 +0800
commitbf7641addc17fd43a6f04be6a7a34bfa297e5544 (patch)
tree3b67fc762f0d50eefdb79f5f1cc4716a9c9911ae /shell/e-shell-folder-title-bar.c
parentb76b0e2c9bc5c568cdfa0be15c29df9a1f06972a (diff)
downloadgsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.gz
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.bz2
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.lz
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.xz
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.zst
gsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.zip
Fix a leak: unref the EFont after we have used it. Also, don't crash if
* e-shell-folder-title-bar.c (label_realize_callback): Fix a leak: unref the EFont after we have used it. Also, don't crash if `e_font_to_gdk_font()' returns NULL. [This should fix #7666, Folder View crashes Evo.] svn path=/trunk/; revision=12353
Diffstat (limited to 'shell/e-shell-folder-title-bar.c')
-rw-r--r--shell/e-shell-folder-title-bar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index 836da098cb..1ed1dcca6e 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -147,9 +147,12 @@ label_realize_callback (GtkWidget *widget,
e_font = e_font_from_gdk_font (style->font);
bolded_font = e_font_to_gdk_font (e_font, E_FONT_BOLD);
+ e_font_unref (e_font);
- gdk_font_unref (style->font);
- style->font = bolded_font;
+ if (bolded_font != NULL) {
+ gdk_font_unref (style->font);
+ style->font = bolded_font;
+ }
gtk_style_attach (style, widget->window);