gfio: patch around widget destroy crash
authorJens Axboe <axboe@kernel.dk>
Wed, 14 Mar 2012 18:39:02 +0000 (19:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Mar 2012 18:39:02 +0000 (19:39 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c

diff --git a/gfio.c b/gfio.c
index 068f229e75ba252b5a011fd1e45cabccd2f4d6d7..cbedaa2d3d7aef5344830e2c127a2223b1f6cdc4 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -1683,7 +1683,11 @@ static void ge_widget_destroy(GtkWidget *w, gpointer data)
 {
        struct gui_entry *ge = data;
 
-       ge_destroy(ge);
+       /*
+        * Why are we getting NULL data here sometimes?
+        */
+       if (ge)
+               ge_destroy(ge);
 }
 
 static void gfio_quit(struct gui *ui)