summaryrefslogtreecommitdiff
path: root/src/gui/panels/strings.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
commitd614d4b09230411455ed07aac289025a55633da8 (patch)
treec94a14097f9e97b21e5780852589d167ca68ba59 /src/gui/panels/strings.c
parentafc9e5510d9520928480042a56a193dd71db6a01 (diff)
Referenced all accesses to the main window.
Diffstat (limited to 'src/gui/panels/strings.c')
-rw-r--r--src/gui/panels/strings.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c
index 7fd0ffc..a99b40c 100644
--- a/src/gui/panels/strings.c
+++ b/src/gui/panels/strings.c
@@ -1269,7 +1269,7 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
const mrange_t *range; /* Couverture en mémoire */
GArchProcessor *proc; /* Processeur de l'architecture*/
GArchInstruction *instr; /* Point de croisements */
- GObject *ref; /* Espace de référencements */
+ GtkWindow *editor; /* Fenêtre graphique principale*/
GtkWidget *dialog; /* Boîte de dialogue à montrer */
vmpa2t *addr; /* Adresse de destination */
GLoadedPanel *display; /* Afficheur effectif de code */
@@ -1287,9 +1287,9 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
*/
instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range));
- ref = G_OBJECT(get_editor_window());//g_editor_item_get_global_ref(G_EDITOR_ITEM(panel));
+ editor = get_editor_window();
- dialog = create_gotox_dialog_for_cross_references(GTK_WINDOW(ref), panel->binary, instr, true);
+ dialog = create_gotox_dialog_for_cross_references(editor, panel->binary, instr, true);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
{
@@ -1308,6 +1308,8 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
gtk_widget_destroy(dialog);
+ g_object_unref(G_OBJECT(editor));
+
if (instr != NULL)
g_object_unref(G_OBJECT(instr));