[gtk+/wip/dboles/scrolledwindow-measure: 1/4] scrolledwindow: Avoid critical when removing source



commit 7214f4d4c956bf76443c0712cd343bba36050f3d
Author: Timm Bäder <mail baedert org>
Date:   Wed May 10 10:55:50 2017 +0200

    scrolledwindow: Avoid critical when removing source
    
    Make sure indicator->conceil_timer is actually set before trying to
    remove it.

 gtk/gtkscrolledwindow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 69faa06..51b9086 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -4192,7 +4192,8 @@ indicator_set_fade (Indicator *indicator,
       gdk_window_show (indicator->window);
       indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
     }
-  if (!visible && gdk_window_is_visible (indicator->window))
+  if (!visible && gdk_window_is_visible (indicator->window) &&
+      indicator->conceil_timer != 0)
     {
       gdk_window_hide (indicator->window);
       g_source_remove (indicator->conceil_timer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]