malcontent-control: Fix a crash when flushing changes

The `GSource` was being removed twice, once in `blacklist_apps_cb()` and
once in `flush_update_blacklisted_apps()`, leading to a critical warning
from GLib.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-01-14 13:28:54 +00:00
parent c7f975bb2b
commit 368cc1fb76
1 changed files with 3 additions and 1 deletions

View File

@ -305,9 +305,11 @@ flush_update_blacklisted_apps (MctUserControls *self)
{
if (self->blacklist_apps_source_id > 0)
{
blacklist_apps_cb (self);
/* Remove the timer and forcefully call the timer callback. */
g_source_remove (self->blacklist_apps_source_id);
self->blacklist_apps_source_id = 0;
blacklist_apps_cb (self);
}
}