From f485ad7546520680ed50eca4a1f9956d51ff3beb Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 11 Jul 2024 23:06:26 +0200 Subject: [PATCH] drm: guard connector in calculateMode --- src/backend/drm/DRM.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index 6f11b41..076e7fe 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -1703,6 +1703,9 @@ uint32_t Aquamarine::CDRMFB::submitBuffer() { } void Aquamarine::SDRMConnectorCommitData::calculateMode(Hyprutils::Memory::CSharedPointer connector) { + if (!connector || !connector->output || !connector->output->state) + return; + const auto& STATE = connector->output->state->state(); const auto MODE = STATE.mode ? STATE.mode : STATE.customMode;