summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-search-engine-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnautilus-private/nautilus-search-engine-simple.c')
-rw-r--r--libnautilus-private/nautilus-search-engine-simple.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-search-engine-simple.c b/libnautilus-private/nautilus-search-engine-simple.c
index 09684c3fa..3e6c10aa2 100644
--- a/libnautilus-private/nautilus-search-engine-simple.c
+++ b/libnautilus-private/nautilus-search-engine-simple.c
@@ -99,7 +99,7 @@ search_thread_data_new (NautilusSearchEngineSimple *engine,
data = g_new0 (SearchThreadData, 1);
- data->engine = engine;
+ data->engine = g_object_ref (engine);
data->directories = g_queue_new ();
data->visited = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
uri = nautilus_query_get_location (query);
@@ -139,6 +139,8 @@ search_thread_data_free (SearchThreadData *data)
g_strfreev (data->words);
g_list_free_full (data->mime_types, g_free);
g_list_free_full (data->hits, g_object_unref);
+ g_object_unref (data->engine);
+
g_free (data);
}