From df01de7d6112f48393e89d40c9bde8eeb6b4153d Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Mon, 4 Nov 2024 12:58:52 +0100 Subject: [PATCH] drm: dont commit state if renderer is missing setting certain env vars to force egl implentations makes the render creation fail on the second gpu. instead of causing a coredump, safeguard commitState and let the monitor turn blank instead. --- src/backend/drm/DRM.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index b278baf..f0f37af 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -1400,6 +1400,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) { return false; } + if (!backend->rendererState.renderer) { + backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend"); + return false; + } + const auto& STATE = state->state(); const uint32_t COMMITTED = STATE.committed;