[nautilus/692-segfault-during-find-as-you-type-in-libgobject] search-engine-recent: Give back a ref to idle



commit de6bc36275e56698cddb5c2c51014abd81871fc6
Author: António Fernandes <antoniof gnome org>
Date:   Sat Oct 13 22:39:46 2018 +0100

    search-engine-recent: Give back a ref to idle
    
    Since commit 4c6d4eea995a66e80fb21ee83b66954d1ce71c08, we don't haven't
    been increaseing the reference count of the recent search engine when
    not running in a thread.
    
    But the idle callback unref's it anyway, which causes the recent engine
    to be destroyed, while NautilusSearchEngine still holds a referenc to
    it. This causes a crash when trying to cancel the recent engine.
    
    Restore reference count increase to fix this.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/692

 src/nautilus-search-engine-recent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]