From 67bdaae04ab37f38a6d0c8dc4b6328c3ba3b3393 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 6 Nov 2005 07:41:29 +0000 Subject: Sun bug #6325220: Xorg dumps core in dual monitor configuration with radeon driver if CRT2Position not specified in xorg.conf (Stuart Krietman - Sun Microsystems) --- src/radeon_driver.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 8dc3271e..0d7fa7ed 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -8880,8 +8880,15 @@ RADEONGetMergedFBOptions(ScrnInfoPtr pScrn) Bool valid = FALSE; char *tempstr; strptr = (char *)xf86GetOptValString(info->Options, OPTION_CRT2POS); - tempstr = xalloc(strlen(strptr) + 1); - result = sscanf(strptr, "%s %d", tempstr, &ival); + if (strptr) { + tempstr = xalloc(strlen(strptr) + 1); + result = sscanf(strptr, "%s %d", tempstr, &ival); + } else { /* Not specified - default is "Clone" */ + tempstr = NULL; + result = 0; + info->CRT2Position = radeonClone; + valid = TRUE; + } if(result >= 1) { if(!xf86NameCmp(tempstr,"LeftOf")) { info->CRT2Position = radeonLeftOf; -- cgit v1.2.3