summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-08 20:00:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-08 20:00:01 (GMT)
commit8b17768e12ac797e06b5829ee4a4b9ab8da78954 (patch)
treeb66abdbb52fa9b2cf07738ab67900f05721bc65e /src
parentb3b515ba37ef58751e5407bfcdff2dd67932b99a (diff)
Improved reference count tracking.
Diffstat (limited to 'src')
-rw-r--r--src/analysis/loaded.c2
-rw-r--r--src/gui/core/items.c6
-rw-r--r--src/gui/menus/view.c3
3 files changed, 11 insertions, 0 deletions
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c
index 9b7a2ff..8c45ef4 100644
--- a/src/analysis/loaded.c
+++ b/src/analysis/loaded.c
@@ -818,6 +818,8 @@ GtkWidget *get_loaded_panel_from_built_view(GtkWidget *view)
}
+ g_object_ref(G_OBJECT(result));
+
return result;
}
diff --git a/src/gui/core/items.c b/src/gui/core/items.c
index 68d2556..dff177d 100644
--- a/src/gui/core/items.c
+++ b/src/gui/core/items.c
@@ -88,6 +88,9 @@ void change_editor_items_current_content(GLoadedContent *content)
{
_first_content_change = false;
+ if (content != NULL)
+ g_object_ref(G_OBJECT(content));
+
set_current_content(content);
editem_list_for_each(iter, _editem_list)
@@ -196,6 +199,9 @@ void change_editor_items_current_view(GLoadedPanel *panel)
{
_first_panel_change = false;
+ if (panel != NULL)
+ g_object_ref(G_OBJECT(panel));
+
set_current_view(panel);
editem_list_for_each(iter, _editem_list)
diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c
index 0abdf2a..6f113e2 100644
--- a/src/gui/menus/view.c
+++ b/src/gui/menus/view.c
@@ -755,6 +755,7 @@ static void change_current_view_support(unsigned int wanted)
GLoadedPanel *new; /* Panneau encapsulé */
panel = get_current_view();
+
station = get_dock_station_for_view_panel(GTK_WIDGET(panel));
content = g_loaded_panel_get_content(panel);
@@ -773,6 +774,8 @@ static void change_current_view_support(unsigned int wanted)
change_editor_items_current_view(new);
+ g_object_unref(G_OBJECT(new));
+
g_object_unref(G_OBJECT(cursor));
g_object_unref(G_OBJECT(panel));