From: Jens Axboe Date: Mon, 12 Mar 2012 22:05:29 +0000 (+0100) Subject: gfio: fix crash when pushing 'start job' and no client connected X-Git-Tag: gfio-0.1~169^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=78cb2fe5769be13ea9d9fda62a97981c9ee44341;p=fio.git 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 --- 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);