modesetting: ignore the drmmode if p->atoms is null

Some display drivers might cause p->atoms to be null if the display is
disabled. This will cause segfault when checking
if p->atoms[0] != property .
Some display drivers owned by qualcomm is known to cause this bug.

Signed-off-by: fish4terrisa-MSDSM <flyingfish.msdsm@gmail.com>
This commit is contained in:
fish4terrisa-MSDSM
2025-07-11 16:00:42 +08:00
committed by Enrico Weigelt, metux IT consult
parent cdd81c2744
commit c754162a36

View File

@@ -3178,7 +3178,7 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
for (i = 0; i < drmmode_output->num_props; i++) {
drmmode_prop_ptr p = &drmmode_output->props[i];
if (p->atoms[0] != property)
if (p->atoms && p->atoms[0] != property)
continue;
if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) {