diff options
author | Timm Bäder <mail@baedert.org> | 2017-05-10 10:55:50 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-05-25 16:25:59 +0200 |
commit | 030b96cb495018c255c68884302201bba419435c (patch) | |
tree | 25e63b47ecd2d058f2c2ec31123fbf437f218573 /gtk/gtkscrolledwindow.c | |
parent | 084b356d1e70ccdfc521c1457132c1c9c0822d99 (diff) | |
download | gtk+-030b96cb495018c255c68884302201bba419435c.tar.gz |
scrolledwindow: Avoid critical when removing source
Make sure indicator->conceil_timer is actually set before trying to
remove it.
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r-- | gtk/gtkscrolledwindow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 2eef2bf898..634e7f2d06 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; |