summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-06-27 11:35:45 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-06-27 11:37:04 +0200
commit81c9b084be0ab361b1c5bc3b96e85d0be73446b3 (patch)
treebb37e2c64fc33415372812aec1836d4af4d944b1
parent0599f1d55692a29a5ce87cb06a46e6f760000a37 (diff)
downloaddrakx-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
-rw-r--r--NEWS3
-rw-r--r--lib/network/drakconnect/edit.pm6
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)),
);