From 44be60f7fd5f2b448938d4d7364e2b0d6c602baf Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 8 Jun 2003 19:54:07 +0000 Subject: Fix mem leaks. 2003-06-08 Christian Persch * src/ephy-window.c: (update_favicon_control), (update_spinner_control): Fix mem leaks. --- ChangeLog | 7 +++++++ src/ephy-window.c | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76d3a7116..8143c2573 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-06-08 Christian Persch + + * src/ephy-window.c: (update_favicon_control), + (update_spinner_control): + + Fix mem leaks. + 2003-06-07 Marco Pesenti Gritti * embed/mozilla/mozilla-notifiers.cpp: diff --git a/src/ephy-window.c b/src/ephy-window.c index 72afd6df0..ea6a9e9af 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1295,6 +1295,11 @@ update_favicon_control (EphyWindow *window) gtk_window_set_icon (GTK_WINDOW (window), pixbuf); toolbar_update_favicon (window->priv->toolbar); + + if (pixbuf) + { + g_object_unref (pixbuf); + } } static void @@ -1345,6 +1350,7 @@ static void update_spinner_control (EphyWindow *window) { GList *l, *tabs; + gboolean spin = FALSE; tabs = ephy_window_get_tabs (window); for (l = tabs; l != NULL; l = l->next) @@ -1354,13 +1360,19 @@ update_spinner_control (EphyWindow *window) if (ephy_tab_get_load_status (tab) & TAB_LOAD_STARTED) { - toolbar_spinner_start (window->priv->toolbar); - return; + spin = TRUE; } } g_list_free (tabs); - toolbar_spinner_stop (window->priv->toolbar); + if (spin) + { + toolbar_spinner_start (window->priv->toolbar); + } + else + { + toolbar_spinner_stop (window->priv->toolbar); + } } void -- cgit v1.2.3