shortcutsInhibit: fix crash

This commit is contained in:
Vaxry 2024-07-24 16:26:44 +02:00
parent 72bce7efd5
commit fe19754887

View file

@ -73,7 +73,7 @@ bool CKeyboardShortcutsInhibitProtocol::isInhibited() {
if (!g_pCompositor->m_pLastFocus)
return false;
if (g_pCompositor->getWindowFromSurface(g_pCompositor->m_pLastFocus.lock())->m_sWindowData.noShortcutsInhibit.valueOrDefault())
if (const auto PWINDOW = g_pCompositor->getWindowFromSurface(g_pCompositor->m_pLastFocus.lock()); PWINDOW && PWINDOW->m_sWindowData.noShortcutsInhibit.valueOrDefault())
return false;
for (auto& in : m_vInhibitors) {