Fix a crash when initializing with a property with no atoms

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
This commit is contained in:
Mario Limonciello
2025-06-20 00:33:16 -05:00
parent 953a14f010
commit 9ca573570e

View File

@@ -2454,7 +2454,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->num_atoms && p->atoms[0] != property)
continue;
if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) {