[nautilus] search-engine-recent: use g_autoptr to manage self unref in idle
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] search-engine-recent: use g_autoptr to manage self unref in idle
- Date: Wed, 28 Nov 2018 12:52:02 +0000 (UTC)
commit 9ea71a9a4231faa705fe3249cccfbdc80a94f73e
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Oct 25 07:42:16 2018 -0500
search-engine-recent: use g_autoptr to manage self unref in idle
Use the same pattern we're using in recent_thread_func
src/nautilus-search-engine-recent.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
index 3a7b2adc4..3e4be37d2 100644
--- a/src/nautilus-search-engine-recent.c
+++ b/src/nautilus-search-engine-recent.c
@@ -92,7 +92,7 @@ static gboolean
search_thread_add_hits_idle (gpointer user_data)
{
SearchHitsData *search_hits = user_data;
- NautilusSearchEngineRecent *self = search_hits->recent;
+ g_autoptr (NautilusSearchEngineRecent) self = search_hits->recent;
NautilusSearchProvider *provider = NAUTILUS_SEARCH_PROVIDER (self);
self->add_hits_idle_id = 0;
@@ -111,8 +111,6 @@ search_thread_add_hits_idle (gpointer user_data)
NAUTILUS_SEARCH_PROVIDER_STATUS_NORMAL);
g_object_notify (G_OBJECT (provider), "running");
- g_object_unref (self);
-
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]