diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c index f6629a5d..54010b97 100644 --- a/libweston/backend-drm/kms.c +++ b/libweston/backend-drm/kms.c @@ -1103,11 +1103,13 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, wl_list_for_each(head_base, &b->compositor->head_list, compositor_link) { struct drm_property_info *info; + head = to_drm_head(head_base); + if (!head) + continue; if (weston_head_is_enabled(head_base)) continue; - head = to_drm_head(head_base); connector_id = head->connector.connector_id; if (head->connector.device != device) continue;