Commit 7e9fbd16 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Benjamin Otte

In set_filter(), handle the case where the new filter is the same as the old filter

Signed-off-by: default avatarFederico Mena Quintero <>
parent fb1a72fc
......@@ -1809,15 +1809,20 @@ void
_gtk_file_system_model_set_filter (GtkFileSystemModel *model,
GtkFileFilter * filter)
GtkFileFilter *old_filter;
g_return_if_fail (GTK_IS_FILE_SYSTEM_MODEL (model));
g_return_if_fail (filter == NULL || GTK_IS_FILE_FILTER (filter));
if (filter)
g_object_ref (filter);
if (model->filter)
g_object_unref (model->filter);
old_filter = model->filter;
model->filter = filter;
if (old_filter)
g_object_unref (old_filter);
gtk_file_system_model_refilter_all (model);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment