summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-11 18:47:26 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-11 18:47:26 +0000
commita35a98ff1037b1bba5993102ae71fed4030738cb (patch)
tree6287fea43cf0d79bff96f34d0ab77723d715c05f /lib
parentf32bdd42406c63f96511696a406fa2e4bf83b435 (diff)
downloaddrakx-net-a35a98ff1037b1bba5993102ae71fed4030738cb.tar
drakx-net-a35a98ff1037b1bba5993102ae71fed4030738cb.tar.gz
drakx-net-a35a98ff1037b1bba5993102ae71fed4030738cb.tar.bz2
drakx-net-a35a98ff1037b1bba5993102ae71fed4030738cb.tar.xz
drakx-net-a35a98ff1037b1bba5993102ae71fed4030738cb.zip
do not crash if no device is detected when updating networks (#38734)
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection_manager.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index 53a0312..5fec995 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -267,11 +267,11 @@ sub filter_networks {
sub update_networks {
my ($cmanager) = @_;
- check_setup($cmanager) || setup_connection($cmanager) or return;
-
@{$cmanager->{gui}{networks_list}{data}} = ();
if ($cmanager->{connection}) {
+ check_setup($cmanager) || setup_connection($cmanager) or return;
+
my $wait = $cmanager->{connection}->network_scan_is_slow && $cmanager->{in}->wait_message(N("Please wait"), N("Scanning for networks..."));
$cmanager->{connection}{networks} = $cmanager->{connection}->get_networks;
$cmanager->{connection}{network} ||= find { $cmanager->{connection}{networks}{$_}{current} } keys %{$cmanager->{connection}{networks}};