From 2977ae8e379ae881ea4d13aa6c5a63779045676b Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 12 Jul 2021 14:28:38 +0200 Subject: [PATCH] platforms/drm: don't take the rotation property for granted Should fix the crash on the pinephone --- src/plugins/platforms/drm/drm_object_plane.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/drm/drm_object_plane.cpp b/src/plugins/platforms/drm/drm_object_plane.cpp index d6e2baf3c3..dbb3bb1c17 100644 --- a/src/plugins/platforms/drm/drm_object_plane.cpp +++ b/src/plugins/platforms/drm/drm_object_plane.cpp @@ -140,7 +140,11 @@ void DrmPlane::setBuffer(DrmBuffer *buffer) bool DrmPlane::needsModeset() const { - return getProp(PropertyIndex::CrtcId)->needsCommit() || getProp(PropertyIndex::Rotation)->needsCommit(); + auto rotation = getProp(PropertyIndex::Rotation); + if (rotation && rotation->needsCommit()) { + return true; + } + return getProp(PropertyIndex::CrtcId)->needsCommit(); } }