[anjuta] run-program: Remove unneeded weak pointer
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] run-program: Remove unneeded weak pointer
- Date: Sat, 22 Feb 2014 21:00:03 +0000 (UTC)
commit a455814aa5acc25f759a61c80509784647495af5
Author: Sébastien Granjoux <seb sfo free fr>
Date: Mon Feb 10 22:35:22 2014 +0100
run-program: Remove unneeded weak pointer
plugins/run-program/execute.c | 3 +++
plugins/run-program/plugin.c | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/run-program/execute.c b/plugins/run-program/execute.c
index 8939dc5..d203258 100644
--- a/plugins/run-program/execute.c
+++ b/plugins/run-program/execute.c
@@ -333,6 +333,9 @@ execute_with_terminal (RunProgramPlugin *plugin,
g_free (new_cmd);
+ if (plugin->terminal)
+ g_object_remove_weak_pointer (G_OBJECT (plugin->terminal),
+ (void **)&plugin->terminal);
plugin->terminal = term;
g_object_add_weak_pointer (G_OBJECT (plugin->terminal),
(void **)&plugin->terminal);
diff --git a/plugins/run-program/plugin.c b/plugins/run-program/plugin.c
index f766716..6398f83 100644
--- a/plugins/run-program/plugin.c
+++ b/plugins/run-program/plugin.c
@@ -376,6 +376,13 @@ run_plugin_dispose (GObject *obj)
/* Warning this function could be called several times */
+ if (plugin->terminal != NULL)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (plugin->terminal),
+ (void **)&plugin->terminal);
+ plugin->terminal = NULL;
+ }
+
run_free_all_children (plugin);
G_OBJECT_CLASS (parent_class)->dispose (obj);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]