mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
gdesktopappinfo: Cancel file monitor when resetting a DesktopFileDir
It’s not enough to unref the monitor, since the GLib worker thread might still hold a reference to it. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1903
This commit is contained in:
parent
bffe058550
commit
5b07fc98e0
@ -1329,6 +1329,7 @@ desktop_file_dir_reset (DesktopFileDir *dir)
|
||||
if (dir->monitor)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (dir->monitor, desktop_file_dir_changed, dir);
|
||||
g_file_monitor_cancel (dir->monitor);
|
||||
g_object_unref (dir->monitor);
|
||||
dir->monitor = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user