From cf4b04430772e91f75fe6ce4c550480cd9ee7c7a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 12 Mar 2012 15:09:42 +0100 Subject: [PATCH] gfio: fix wrong pointer being passed into file_open() We passed the gui_entry, it wants the gui. Fixes segfault on clicking "Connect", when attempting to auto-load the file open dialog. Signed-off-by: Jens Axboe --- gfio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfio.c b/gfio.c index c25a2640..ff8763dd 100644 --- a/gfio.c +++ b/gfio.c @@ -1753,7 +1753,7 @@ static void connect_clicked(GtkWidget *widget, gpointer data) int ret; if (!ge->nr_job_files) - file_open(widget, data); + file_open(widget, ge->ui); if (!ge->nr_job_files) return; @@ -2065,7 +2065,7 @@ static void file_new(GtkWidget *w, gpointer data) * Return the 'ge' corresponding to the tab. If the active tab is the * main tab, open a new tab. */ -static struct gui_entry *get_ge_from_page(unsigned int cur_page) +static struct gui_entry *get_ge_from_page(gint cur_page) { struct flist_head *entry; struct gui_entry *ge; -- 2.25.1