From 81c9b084be0ab361b1c5bc3b96e85d0be73446b3 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Jun 2016 11:35:45 +0200 Subject: fix crash when running with --skip-wizard Resolves: mga#16772 --- NEWS | 3 +++ lib/network/drakconnect/edit.pm | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 60cce4f..f4dd4c3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- drakconnect: + o fix crash when running with --skip-wizard (mga#16772) + 2.26 - net_applet: o fix crash if notification queue is not yet initialized (mga#16995) diff --git a/lib/network/drakconnect/edit.pm b/lib/network/drakconnect/edit.pm index 965cc91..7918938 100644 --- a/lib/network/drakconnect/edit.pm +++ b/lib/network/drakconnect/edit.pm @@ -218,7 +218,9 @@ sub build_notebook { foreach (qw(NEEDHOSTNAME PEERDNS)) { #- default these settings to yes defined $intf->{$_} or $intf->{$_} = "yes"; } - $gui->{intf}{$_}->set_text($intf->{$_}) foreach qw(DHCP_HOSTNAME DHCP_TIMEOUT); + foreach (qw(DHCP_HOSTNAME DHCP_TIMEOUT)) { + $intf->{$_} and $gui->{intf}{$_}->set_text($intf->{$_}); + } $gui->{intf_bool}{$_}->set_active(text2bool($intf->{$_})) foreach qw(NEEDHOSTNAME PEERDNS PEERYP PEERNTPD); $gui->{intf}{DHCP_CLIENT}->set_text($intf->{DHCP_CLIENT}); $gui->{sheet}{DHCP}->set_sensitive($intf->{BOOTPROTO} eq 'dhcp'); @@ -291,7 +293,7 @@ sub build_notebook { ), gtkpack__(Gtk3::HBox->new(0,1), gtknew('Label_Left', text => N("Metric")), - gtksignal_connect(gtkset_text($gui->{intf}{METRIC} = Gtk3::Entry->new, $intf->{METRIC}), + gtksignal_connect(gtkset_text($gui->{intf}{METRIC} = Gtk3::Entry->new, $intf->{METRIC} || ''), key_press_event => $apply)), ); -- cgit v1.2.1