summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-06-05 11:17:38 +0000
committerOlivier Blin <oblin@mandriva.com>2009-06-05 11:17:38 +0000
commitddeae471b246fdd9d69877f118f181ae2224174b (patch)
tree9a407dad690b3b23791d4ddb700c91aff13cd7bb
parentb246f0aa6ad7d0fd8a2c9a942d8b53c9f86339d5 (diff)
downloaddrakx-kbd-mouse-x11-ddeae471b246fdd9d69877f118f181ae2224174b.tar
drakx-kbd-mouse-x11-ddeae471b246fdd9d69877f118f181ae2224174b.tar.gz
drakx-kbd-mouse-x11-ddeae471b246fdd9d69877f118f181ae2224174b.tar.bz2
drakx-kbd-mouse-x11-ddeae471b246fdd9d69877f118f181ae2224174b.tar.xz
drakx-kbd-mouse-x11-ddeae471b246fdd9d69877f118f181ae2224174b.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 (backport from trunk)
-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));
}