From 79b6f0a90ffe118d914cb294a8fc82206a40dde2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 28 Nov 2005 18:28:09 +0000 Subject: (switch) be more robust --- perl-install/harddrake/sound.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 44b437ffc..fa140b193 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -216,7 +216,7 @@ sub switch { my $driver = $device->{current_driver} || $device->{driver}; foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ } - my @alternative = @{get_alternative($driver)}; + my @alternative = $driver ne 'unknown' ? @{get_alternative($driver)} : (); unless ($driver eq $device->{driver} || member($device->{driver}, @alternative)) { push @alternative, @{get_alternative($device->{driver})}, $device->{driver}; } -- cgit v1.2.1