Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 04 Jul 2015 21:58:13 UTC Commit: 7f39a3a730e5a3b823d01057ae40e76f377b4223 https://github.com/geany/geany-plugins/commit/7f39a3a730e5a3b823d01057ae40e7...
Log Message: ----------- Merge pull request #158 from b4n/debugger/reload-plugin-fix
debugger: Fix crash after plugin reload
Modified Paths: -------------- debugger/src/dconfig.c debugger/src/envtree.c
Modified: debugger/src/dconfig.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -480,6 +480,7 @@ void config_destroy(void) if(keyfile_project) { g_key_file_free(keyfile_project); + keyfile_project = NULL; } }
Modified: debugger/src/envtree.c 11 lines changed, 10 insertions(+), 1 deletions(-) =================================================================== @@ -296,6 +296,7 @@ static void on_value_changed(GtkCellRendererText *renderer, gchar *path, gchar * g_free(striped);
gtk_tree_path_free(being_edited_value); + being_edited_value = NULL; }
/* @@ -331,8 +332,9 @@ static void on_value_editing_cancelled(GtkCellRenderer *renderer, gpointer user_
g_object_set (renderer_value, "editable", FALSE, NULL);
- gtk_tree_path_free(being_edited_value); gtk_tree_path_free(empty_path); + gtk_tree_path_free(being_edited_value); + being_edited_value = NULL; }
/* @@ -399,6 +401,12 @@ GtkWidget* envtree_init(void) GtkTreeViewColumn *column; GtkTreeSelection *selection;
+ /* (re)initialize globals in case plugin was reloaded but those not cleared */ + page_read_only = FALSE; + entering_new_var = FALSE; + empty_row = NULL; + being_edited_value = NULL; + store = gtk_list_store_new ( N_COLUMNS, G_TYPE_STRING, @@ -448,6 +456,7 @@ GtkWidget* envtree_init(void) void envtree_destroy(void) { gtk_tree_row_reference_free(empty_row); + empty_row = NULL; }
/*
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).