summaryrefslogtreecommitdiff
path: root/src/gui/editem.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-12-30 10:38:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-12-30 10:38:52 (GMT)
commit932ea7c83c07d3982fee605c6dd9895fd2753874 (patch)
tree766ad53bab9e3e3005334c30e823493de8e84168 /src/gui/editem.c
parent1b5d39bfbc48c33a0ea0924b60e48448c8b45dd4 (diff)
Rewritten the line buffers using generators and on-demand building to save memory.
Diffstat (limited to 'src/gui/editem.c')
-rw-r--r--src/gui/editem.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/editem.c b/src/gui/editem.c
index fc502a0..0ec2d72 100644
--- a/src/gui/editem.c
+++ b/src/gui/editem.c
@@ -27,7 +27,6 @@
#include "editem-int.h"
#include "../analysis/db/items/move.h"
-#include "../gtkext/gtkblockview.h"
@@ -250,10 +249,14 @@ void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary)
GEditorItem *iter; /* Boucle de parcours */
GEditorItemClass *klass; /* Classe correspondante */
- if (binary != NULL)
- g_object_ref(G_OBJECT(binary));
+ if (binary == NULL)
+ g_object_set_data(ref, "current_binary", NULL);
- g_object_set_data_full(ref, "current_binary", binary, g_object_unref);
+ else
+ {
+ g_object_ref(G_OBJECT(binary));
+ g_object_set_data_full(ref, "current_binary", binary, g_object_unref);
+ }
editem_list_for_each(iter, _editem_list)
{