From 78cb2fe5769be13ea9d9fda62a97981c9ee44341 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 12 Mar 2012 23:05:29 +0100 Subject: [PATCH] gfio: fix crash when pushing 'start job' and no client connected We should not really need this fix, but until the menu item sensitivity is fixed, they are visible and we should avoid the crash. Signed-off-by: Jens Axboe --- gfio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfio.c b/gfio.c index ff8763dd..51bac2aa 100644 --- a/gfio.c +++ b/gfio.c @@ -1738,8 +1738,8 @@ static void start_job_clicked(__attribute__((unused)) GtkWidget *widget, struct gui_entry *ge = data; struct gfio_client *gc = ge->client; - gtk_widget_set_sensitive(ge->button[START_JOB_BUTTON], 0); - fio_start_client(gc->client); + if (gc) + fio_start_client(gc->client); } static void file_open(GtkWidget *w, gpointer data); -- 2.25.1