[nautilus] files-view: don't hold a reference to a view for scripts



commit 6ddcaa54026fc51e500975d6e70891761028c01b
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Mar 23 17:22:37 2016 +0100

    files-view: don't hold a reference to a view for scripts
    
    I'm not sure the scripts should hold a reference to the view itself...
    Just remove it as we did with the templates in the past.
    
    What we can do in future is add a weak reference, but I'm still unsure
    this is necessary here.
    
    For now fix this since it causes crashes when using scripts.

 src/nautilus-files-view.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 4e3f11d..e233336 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -960,7 +960,6 @@ script_launch_parameters_new (NautilusFile *file,
         ScriptLaunchParameters *result;
 
         result = g_new0 (ScriptLaunchParameters, 1);
-        g_object_ref (directory_view);
         result->directory_view = directory_view;
         nautilus_file_ref (file);
         result->file = file;
@@ -971,7 +970,6 @@ script_launch_parameters_new (NautilusFile *file,
 static void
 script_launch_parameters_free (ScriptLaunchParameters *parameters)
 {
-        g_object_unref (parameters->directory_view);
         nautilus_file_unref (parameters->file);
         g_free (parameters);
 }


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