Skip to content

Commit

Permalink
drm: dont commit state if renderer is missing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gulafaran committed Nov 13, 2024
1 parent 17513b5 commit df01de7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit df01de7

Please sign in to comment.