diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-27 11:35:45 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-27 11:37:04 +0200 |
commit | 81c9b084be0ab361b1c5bc3b96e85d0be73446b3 (patch) | |
tree | bb37e2c64fc33415372812aec1836d4af4d944b1 /lib | |
parent | 0599f1d55692a29a5ce87cb06a46e6f760000a37 (diff) | |
download | drakx-net-81c9b084be0ab361b1c5bc3b96e85d0be73446b3.tar drakx-net-81c9b084be0ab361b1c5bc3b96e85d0be73446b3.tar.gz drakx-net-81c9b084be0ab361b1c5bc3b96e85d0be73446b3.tar.bz2 drakx-net-81c9b084be0ab361b1c5bc3b96e85d0be73446b3.tar.xz drakx-net-81c9b084be0ab361b1c5bc3b96e85d0be73446b3.zip |
fix crash when running with --skip-wizard
Resolves: mga#16772
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/drakconnect/edit.pm | 6 |
1 files changed, 4 insertions, 2 deletions
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)), ); |