gfio: reload ge->gc after clicking connect force the file open dialog
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Mar 2012 13:05:01 +0000 (14:05 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Mar 2012 13:05:01 +0000 (14:05 +0100)
If the above happened, then we had no client to begin with and
gc is NULL. Reload it after in any case, to ensure we have a
valid copy.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c

diff --git a/gfio.c b/gfio.c
index 93c8e171c131b6a4db460f65666741ba0f31a756..58faaaf9e29321c5332f54346b20f573b0f5edab 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -2091,6 +2091,8 @@ static void connect_clicked(GtkWidget *widget, gpointer data)
                if (!ge->nr_job_files)
                        return;
 
+               gc = ge->client;
+
                gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ge->thread_status_pb), "No jobs running");
                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ge->thread_status_pb), 0.0);
                ret = fio_client_connect(gc->client);