summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Dirsch <sndirsch@suse.de>2009-04-16 15:34:12 +0200
committerStefan Dirsch <sndirsch@suse.de>2009-04-16 15:34:12 +0200
commit32bc0bcec815a363a47b9e7337d06370baf0c0d4 (patch)
tree014248273fe39023fe3ef0a84ac898563a7d1daf
parent70681daa0392e5fa413f888d92a30ddacdcc9c8c (diff)
Prevent MergedFB setups from crashing.
Second time mga_read_and_process_bios() is called pMga->chip_attribs is a NULL pointer for some reason. (#21022)
-rw-r--r--src/mga_bios.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mga_bios.c b/src/mga_bios.c
index b78890e..c015077 100644
--- a/src/mga_bios.c
+++ b/src/mga_bios.c
@@ -326,8 +326,9 @@ Bool mga_read_and_process_bios( ScrnInfoPtr pScrn )
* isn't found or can't be read we'll still have some reasonable values
* to use.
*/
- (void) memcpy(& pMga->bios, & pMga->chip_attribs->default_bios_values,
- sizeof(struct mga_bios_values));
+ if (pMga->chip_attribs)
+ (void) memcpy(& pMga->bios, & pMga->chip_attribs->default_bios_values,
+ sizeof(struct mga_bios_values));
/* If the BIOS address was probed, it was found from the PCI config space