diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-22 04:18:49 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-22 04:18:49 +0800 |
commit | bf7641addc17fd43a6f04be6a7a34bfa297e5544 (patch) | |
tree | 3b67fc762f0d50eefdb79f5f1cc4716a9c9911ae /shell | |
parent | b76b0e2c9bc5c568cdfa0be15c29df9a1f06972a (diff) | |
download | gsoc2013-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/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-shell-folder-title-bar.c | 7 |
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); |