summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/monitor.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-06-04 14:31:51 +0000
committerOlivier Blin <oblin@mandriva.com>2009-06-04 14:31:51 +0000
commitfb639daca092b8290926473868ddcb3eadb1c785 (patch)
treef6e1a3c243a9198875dbe14fb19c9f2c21ea5fff /lib/Xconfig/monitor.pm
parent1ec693892926e79a89039c1d4dd33144778d8a02 (diff)
downloaddrakx-kbd-mouse-x11-fb639daca092b8290926473868ddcb3eadb1c785.tar
drakx-kbd-mouse-x11-fb639daca092b8290926473868ddcb3eadb1c785.tar.gz
drakx-kbd-mouse-x11-fb639daca092b8290926473868ddcb3eadb1c785.tar.bz2
drakx-kbd-mouse-x11-fb639daca092b8290926473868ddcb3eadb1c785.tar.xz
drakx-kbd-mouse-x11-fb639daca092b8290926473868ddcb3eadb1c785.zip
fix crash when both monitor and driver can not be probed (for example with some Quanta IL1 netbooks using Chrome9 IC3)
this crash happens with harddrake service or XFdrake --auto: Can't use an undefined value as a HASH reference at /usr/lib/libDrakX/Xconfig/monitor.pm line 85
Diffstat (limited to 'lib/Xconfig/monitor.pm')
-rw-r--r--lib/Xconfig/monitor.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm
index cc963c7..75fcb6e 100644
--- a/lib/Xconfig/monitor.pm
+++ b/lib/Xconfig/monitor.pm
@@ -82,7 +82,8 @@ sub configure_auto_install {
my $card_Driver;
if (!is_valid($monitors->[0])) {
- $card_Driver ||= first(Xconfig::card::probe())->{Driver};
+ my ($first_card) = Xconfig::card::probe();
+ $card_Driver = $first_card->{Driver} if $first_card;
put_in_hash($monitors->[0], probe($card_Driver));
}