]> Pileus Git - ~andy/gtk/commitdiff
Clear all optionally created widget pointer in priv. Initially priv is
authorAlexander Larsson <alexl@redhat.com>
Tue, 10 Mar 2009 10:29:03 +0000 (10:29 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Tue, 10 Mar 2009 10:29:03 +0000 (10:29 +0000)
2009-03-10  Alexander Larsson  <alexl@redhat.com>

        * gtk/gtkmountoperation.c:
        (gtk_mount_operation_ask_password):
Clear all optionally created widget pointer in priv. Initially
priv is cleared so thats ok, but on a second call we may have
leftovers from previous calls which is problematic if for instance
we asked for the user the first time and not the second, then we
will access the old priv->username_entry.

svn path=/trunk/; revision=22496

ChangeLog
gtk/gtkmountoperation.c

index 349247fbb09a4e92fe9d53ef9f0bd3750f58aecb..2fee18dc8b51668e81dc5bb1380604d1370434aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-03-10  Alexander Larsson  <alexl@redhat.com>
+
+        * gtk/gtkmountoperation.c:
+        (gtk_mount_operation_ask_password):
+       Clear all optionally created widget pointer in priv. Initially
+       priv is cleared so thats ok, but on a second call we may have
+       leftovers from previous calls which is problematic if for instance
+       we asked for the user the first time and not the second, then we
+       will access the old priv->username_entry.
+
 2009-03-06  Michael Natterer  <mitch@gimp.org>
 
        * gtk/gtkscalebutton.c (gtk_scale_button_set_property): don't call
index 66563eeec57cb1a0d92c9b2d46a069bd762c8fb2..add46e85bd6e7834ad0e2f4c2db7a1239a4a9dbb 100644 (file)
@@ -516,6 +516,7 @@ gtk_mount_operation_ask_password (GMountOperation   *mount_op,
 
   can_anonymous = flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
 
+  priv->anonymous_toggle = NULL;
   if (can_anonymous)
     {
       GtkWidget *anon_box;
@@ -571,14 +572,17 @@ gtk_mount_operation_ask_password (GMountOperation   *mount_op,
 
   rows = 0;
 
+  priv->username_entry = NULL;
   if (flags & G_ASK_PASSWORD_NEED_USERNAME)
     priv->username_entry = table_add_entry (table, rows++, _("_Username:"),
                                             default_user, operation);
 
+  priv->domain_entry = NULL;
   if (flags & G_ASK_PASSWORD_NEED_DOMAIN)
     priv->domain_entry = table_add_entry (table, rows++, _("_Domain:"),
                                           default_domain, operation);
 
+  priv->password_entry = NULL;
   if (flags & G_ASK_PASSWORD_NEED_PASSWORD)
     {
       priv->password_entry = table_add_entry (table, rows++, _("_Password:"),