diff options
author | António Fernandes <antoniof@gnome.org> | 2018-10-13 21:39:46 +0000 |
---|---|---|
committer | Ernestas Kulik <ernestas.kulik@gmail.com> | 2018-10-28 20:52:38 +0000 |
commit | aaba2b937f7bf6e26d7acbb8a98b185bd6b83c15 (patch) | |
tree | 3b6fa0c2d8b0ad1a37dc7f3fc35aa1898d74ee69 | |
parent | 6679353548e52fe5679f6c2008a569c922dac835 (diff) | |
download | nautilus-aaba2b937f7bf6e26d7acbb8a98b185bd6b83c15.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
(cherry picked from commit 3eecada7ad7db8d66be24cfc4ba6677e33c7d6e1)
-rw-r--r-- | src/nautilus-search-engine-recent.c | 2 |
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; } |