[anjuta] autotools plugin: increase reference count of the selected file



commit 47953ab60ca5b51c58b6baf7ad789826da0d9661
Author: Alban Browaeys <prahal yahoo com>
Date:   Wed Jul 6 01:32:15 2011 +0200

    autotools plugin: increase reference count of the selected file
    
    Increase reference count of the selected file as we later on decrease it.
    Otherwise after a two selection of the same directory :
     GLib-GObject-CRITICAL **: g_value_set_object: assertion `G_IS_OBJECT (v_object)' failed
    or/and segfault ensue.
    
    This also applies to files though there is a leak in the file-manager for files
    so this is hidden.

 plugins/build-basic-autotools/plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/build-basic-autotools/plugin.c b/plugins/build-basic-autotools/plugin.c
index 52d6a6e..c242258 100644
--- a/plugins/build-basic-autotools/plugin.c
+++ b/plugins/build-basic-autotools/plugin.c
@@ -2122,7 +2122,7 @@ value_added_fm_current_file (AnjutaPlugin *plugin, const char *name,
 	
 	if (ba_plugin->fm_current_file)
 		g_object_unref (ba_plugin->fm_current_file);
-	ba_plugin->fm_current_file = g_value_get_object (value);
+	ba_plugin->fm_current_file = g_value_dup_object (value);
 
 	update_fm_module_ui (ba_plugin);
 }



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