g80: Avoid segfault if AccelMethod isn't set and XAA isn't built

Fixes: b1b6f64 ("g80: dont set accelmethod to xaa when xaa is disabled")
Reviewed-by: Yusuf Khan <yusisamerican@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/27>
This commit is contained in:
Alan Coopersmith
2025-07-20 12:21:16 -07:00
committed by Enrico Weigelt, metux IT consult
parent 74aae8609f
commit a3691dad26

View File

@@ -273,7 +273,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");
}
s = xf86GetOptValString(pNv->Options, OPTION_ACCEL_METHOD);
if(!strcasecmp(s, "exa"))
if(!s || !strcasecmp(s, "exa"))
pNv->AccelMethod = EXA;
else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unrecognized AccelMethod "