- var id_card = id_card_widget.id_card;
- var vr_children = this.vbox_right.get_children();
- foreach (var vr_child in vr_children)
- this.vbox_right.remove(vr_child);
- if (id_card.display_name == IdCard.NO_IDENTITY) {
- this.vbox_right.pack_start(no_identity_title, false, true, 0);
- } else {
- this.username_entry.set_text (id_card.username);
- this.password_entry.set_text (id_card.password ?? "");
- this.vbox_right.pack_start(login_vbox, false, true, 0);
- this.remember_checkbutton.active = id_card.store_password;
- }
- this.vbox_right.pack_start (services_vbox, false, true, 0);
+ var vr_children = this.vbox_right.get_children();
+ foreach (var vr_child in vr_children)
+ this.vbox_right.remove(vr_child);
+ if (id_card_widget != null) {
+ var id_card = id_card_widget.id_card;
+ if (id_card.display_name == IdCard.NO_IDENTITY) {
+ this.vbox_right.pack_start(no_identity_title, false, true, 0);
+ } else {
+ this.username_entry.set_text (id_card.username);
+ this.password_entry.set_text (id_card.password ?? "");
+ this.vbox_right.pack_start(login_vbox, false, true, 0);
+ this.remember_checkbutton.active = id_card.store_password;
+ }
+ this.vbox_right.pack_start (services_vbox, false, true, 0);