summaryrefslogtreecommitdiff
path: root/plugins/ropgadgets/select.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-29 22:30:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-29 22:30:58 (GMT)
commit6ba73df8224dc2a88fe5f37a331960936758036e (patch)
tree3db220cc946f3a23887016f3922fe94545e27620 /plugins/ropgadgets/select.c
parentd91239074b9042988d08093948059096942bdcfc (diff)
Skipped the link to the global reference space when loading plugins.
Diffstat (limited to 'plugins/ropgadgets/select.c')
-rw-r--r--plugins/ropgadgets/select.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c
index aa6603f..92456e7 100644
--- a/plugins/ropgadgets/select.c
+++ b/plugins/ropgadgets/select.c
@@ -41,6 +41,7 @@
#include <common/extstr.h>
#include <core/formats.h>
#include <core/processors.h>
+#include <gui/core/global.h>
#include <gtkext/easygtk.h>
@@ -222,8 +223,7 @@ static void add_new_gadgets_for_category(GExeFormat *, GtkComboBoxText *, GtkTre
/******************************************************************************
* *
-* Paramètres : global = espace de référencements global. *
-* parent = fenêtre principale de l'éditeur. *
+* Paramètres : parent = fenêtre principale de l'éditeur. *
* *
* Description : Crée et affiche un assistant de sélection de gadgets ROP. *
* *
@@ -233,7 +233,7 @@ static void add_new_gadgets_for_category(GExeFormat *, GtkComboBoxText *, GtkTre
* *
******************************************************************************/
-void run_rop_finder_assistant(GObject *global, GtkWindow *parent)
+void run_rop_finder_assistant(GtkWindow *parent)
{
GtkWidget *assistant; /* Fenêtre à afficher */
GObject *ref; /* Espace de référencement */
@@ -247,7 +247,6 @@ void run_rop_finder_assistant(GObject *global, GtkWindow *parent)
gtk_window_set_transient_for(GTK_WINDOW(assistant), parent);
ref = G_OBJECT(assistant);
- g_object_set_data(ref, "global", global);
register_input_output_panel(GTK_ASSISTANT(assistant), ref);
register_search_display_panel(GTK_ASSISTANT(assistant), ref);
@@ -503,7 +502,6 @@ static void register_input_output_panel(GtkAssistant *assistant, GObject *ref)
static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
{
GtkWidget *result; /* Composant à retourner */
- GObject *global; /* Espace de référencements */
GLoadedBinary *current; /* Binaire actif courant */
gint selected; /* Indice à sélectionner */
GtkListStore *store; /* Modèle de gestion en liste */
@@ -515,9 +513,7 @@ static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
/* Récupération du binaire courant */
- global = G_OBJECT(g_object_get_data(ref, "global"));
-
- current = G_LOADED_BINARY(g_object_get_data(global, "current_binary"));
+ current = get_current_binary();
/* Constitution d'une liste de binaires courants */
@@ -567,6 +563,8 @@ static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
g_object_unref(G_OBJECT(store));
+ g_object_unref(G_OBJECT(current));
+
return result;
}