[gtk+/wip/carlosg/event-delivery: 84/104] scrolledwindow: Avoid critical when removing source



commit 030b96cb495018c255c68884302201bba419435c
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 2eef2bf..634e7f2 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3810,7 +3810,8 @@ indicator_set_fade (Indicator *indicator,
     {
       indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
     }
-  if (!visible && gtk_widget_get_mapped (indicator->scrollbar))
+  if (!visible && gtk_widget_get_mapped (indicator->scrollbar) &&
+      indicator->conceil_timer != 0)
     {
       g_source_remove (indicator->conceil_timer);
       indicator->conceil_timer = 0;


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