scrolledwindow: Avoid critical when removing source

Make sure indicator->conceil_timer is actually set before trying to
remove it.
This commit is contained in:
Timm Bäder 2017-05-10 10:55:50 +02:00 committed by Carlos Garnacho
parent 084b356d1e
commit 030b96cb49

View File

@ -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;