]> www.fi.muni.cz Git - evince.git/commitdiff
leak fix: unref fullscreen_timeout_source before clearing it
authorChristopher Aillon <caillon@redhat.com>
Thu, 8 Sep 2005 19:30:10 +0000 (19:30 +0000)
committerChristopher Aillon <caillon@src.gnome.org>
Thu, 8 Sep 2005 19:30:10 +0000 (19:30 +0000)
2005-09-08  Christopher Aillon  <caillon@redhat.com>

* shell/ev-window.c: (fullscreen_timeout_cb),
(fullscreen_set_timeout), (fullscreen_clear_timeout),
(ev_window_dispose):

leak fix: unref fullscreen_timeout_source before clearing it

ChangeLog
shell/ev-window.c

index 9e306804b883cc620f838b9338db5e56474e35ed..20b79c9c42864fd689c2860565fb725e719c0a1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-08  Christopher Aillon  <caillon@redhat.com>
+
+       * shell/ev-window.c: (fullscreen_timeout_cb),
+       (fullscreen_set_timeout), (fullscreen_clear_timeout),
+       (ev_window_dispose):
+
+       leak fix: unref fullscreen_timeout_source before clearing it
+
 2005-09-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
         * configure.ac, dvi/mdvi/Makefile.am: 
index 9bd1eac987c5c6aa2d1ab2f20c13a870edde39f9..0b4f919e085ad75e6df553781d93da9f4fc3857e 100644 (file)
@@ -1681,6 +1681,7 @@ fullscreen_timeout_cb (gpointer data)
 
        g_object_set (window->priv->fullscreen_popup, "visible", FALSE, NULL);
        ev_view_hide_cursor (EV_VIEW (window->priv->view));
+       g_source_unref (window->priv->fullscreen_timeout_source);
        window->priv->fullscreen_timeout_source = NULL;
 
        return FALSE;
@@ -1691,8 +1692,10 @@ fullscreen_set_timeout (EvWindow *window)
 {
        GSource *source;
 
-       if (window->priv->fullscreen_timeout_source != NULL)
+       if (window->priv->fullscreen_timeout_source != NULL) {
+               g_source_unref (window->priv->fullscreen_timeout_source);
                g_source_destroy (window->priv->fullscreen_timeout_source);
+       }
 
        source = g_timeout_source_new (1000);
        g_source_set_callback (source, fullscreen_timeout_cb, window, NULL);
@@ -1703,8 +1706,10 @@ fullscreen_set_timeout (EvWindow *window)
 static void
 fullscreen_clear_timeout (EvWindow *window)
 {
-       if (window->priv->fullscreen_timeout_source != NULL)
+       if (window->priv->fullscreen_timeout_source != NULL) {
+               g_source_unref (window->priv->fullscreen_timeout_source);
                g_source_destroy (window->priv->fullscreen_timeout_source);
+       }
 
        window->priv->fullscreen_timeout_source = NULL;
        ev_view_show_cursor (EV_VIEW (window->priv->view));
@@ -2777,6 +2782,7 @@ ev_window_dispose (GObject *object)
        }
 
        if (window->priv->fullscreen_timeout_source) {
+               g_source_unref (window->priv->fullscreen_timeout_source);
                g_source_destroy (window->priv->fullscreen_timeout_source);
                window->priv->fullscreen_timeout_source = NULL;
        }