dpms: Make sure we are not calling the interface after the output is gone

It seems it's possible at times, as described in the bug.

BUG: 466346
remotes/origin/work/zzag/deleted-minor-cleanups
Aleix Pol 3 years ago committed by Vlad Zahorodnii
parent 71956e1bb5
commit fb3018b711
  1. 8
      src/wayland/dpms_interface.cpp

@ -133,11 +133,19 @@ void DpmsInterface::org_kde_kwin_dpms_set(Resource *resource, uint32_t mode)
void DpmsInterface::sendSupported()
{
if (!m_output || m_output->isRemoved()) {
return;
}
send_supported(m_output->handle()->capabilities() & Output::Capability::Dpms ? 1 : 0);
}
void DpmsInterface::sendMode()
{
if (!m_output || m_output->isRemoved()) {
return;
}
const auto mode = m_output->handle()->dpmsMode();
org_kde_kwin_dpms_mode wlMode;
switch (mode) {

Loading…
Cancel
Save