]> Pileus Git - ~andy/gtk/commitdiff
gtk-demo: Don't leave a dangling pointer to a destroyed widget
authorMatthias Clasen <mclasen@redhat.com>
Sat, 16 Apr 2011 17:42:24 +0000 (13:42 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 6 May 2011 18:28:28 +0000 (14:28 -0400)
When destroying the assistant, clean up the static variable
that points to it.

demos/gtk-demo/assistant.c

index 232d345c07c57455dc64e722c6fea111ad53e908..059d88d5bc41188b1ec3a7b3e705ffda39c04d38 100644 (file)
@@ -29,6 +29,7 @@ apply_changes_gradually (gpointer data)
     {
       /* Close automatically once changes are fully applied. */
       gtk_widget_destroy (assistant);
+      assistant = NULL;
       return FALSE;
     }
 }