[gtk+] gtk-demo: Don't leave a dangling pointer to a destroyed widget



commit c8c1075cfe7220be0b82b81358c3bb8bc375e11c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 16 13:42:24 2011 -0400

    gtk-demo: Don't leave a dangling pointer to a destroyed widget
    
    When destroying the assistant, clean up the static variable
    that points to it.

 demos/gtk-demo/assistant.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c
index 232d345..059d88d 100644
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@ -29,6 +29,7 @@ apply_changes_gradually (gpointer data)
     {
       /* Close automatically once changes are fully applied. */
       gtk_widget_destroy (assistant);
+      assistant = NULL;
       return FALSE;
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]