summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2018-10-13 22:39:46 +0100
committerAntónio Fernandes <antoniof@gnome.org>2018-10-14 00:42:11 +0100
commit3eecada7ad7db8d66be24cfc4ba6677e33c7d6e1 (patch)
treee9f49130aa3ae466449e32e3be2f81adf0742dd5
parent171ae2ed5206c941f12df5d3f74bc7236f3efd94 (diff)
downloadnautilus-3eecada7ad7db8d66be24cfc4ba6677e33c7d6e1.tar.gz
search-engine-recent: Avoid premature destruction
Since commit 4c6d4eea995a66e80fb21ee83b66954d1ce71c08, we haven't been increasing the reference count of the recent search engine when not creating a thread. But the idle callback unref's it regardless, which causes the recent engine object to be destroyed while NautilusSearchEngine still holds a reference to it. This causes a crash when trying to stop the already destroyed recent engine. Restore reference count increase to fix this. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/692
-rw-r--r--src/nautilus-search-engine-recent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
index 8cc7b88f0..d265c1716 100644
--- a/src/nautilus-search-engine-recent.c
+++ b/src/nautilus-search-engine-recent.c
@@ -339,7 +339,7 @@ nautilus_search_engine_recent_start (NautilusSearchProvider *provider)
nautilus_query_get_recursive (self->query),
location))
{
- search_add_hits_idle (self, NULL);
+ search_add_hits_idle (g_object_ref (self), NULL);
return;
}