drm: guard connector in calculateMode

This commit is contained in:
Vaxry 2024-07-11 23:06:26 +02:00
parent 4fd590af94
commit f485ad7546

View file

@ -1703,6 +1703,9 @@ uint32_t Aquamarine::CDRMFB::submitBuffer() {
}
void Aquamarine::SDRMConnectorCommitData::calculateMode(Hyprutils::Memory::CSharedPointer<SDRMConnector> 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;