From a8baa347275409b9cbeacc830ab2fdf669034e93 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Tue, 20 Mar 2012 07:10:47 +0100 Subject: [PATCH] gfio: clear stale widget pointers on dialog destruction gopt_widgets and gopt_g_widgets arrays need to be cleared when the job editing dialog widget tree is destroyed, otherwise you get a crash or weird behavior if you attempt to edit a job more than once. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe --- goptions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/goptions.c b/goptions.c index 94d60d6c..f671dbec 100644 --- a/goptions.c +++ b/goptions.c @@ -708,4 +708,6 @@ void gopt_get_options_window(GtkWidget *window, struct thread_options *o) gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); + memset(gopt_widgets, 0, sizeof(gopt_widgets)); + memset(gopt_g_widgets, 0, sizeof(gopt_g_widgets)); } -- 2.25.1