aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
parentb76b0e2c9bc5c568cdfa0be15c29df9a1f06972a (diff)
downloadgsoc2013-evolution-bf7641addc17fd43a6f04be6a7a34bfa297e5544.tar.gz
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')
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-shell-folder-title-bar.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index df80470579..c8685b82c0 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-21 Ettore Perazzoli <ettore@ximian.com>
+
+ * 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.]
+
2001-08-21 Iain Holmes <iain@ximian.com>
* e-shell-importer.c (start_import): Don't print a NULL.
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);