Fix one more SIGSEGV while exiting

This commit is contained in:
vaxerski 2022-05-29 00:07:31 +02:00
parent 2cd5059cf1
commit f06d4fca27

View file

@ -144,6 +144,9 @@ void CCompositor::cleanupExit() {
if (!m_sWLDisplay) if (!m_sWLDisplay)
return; return;
m_pLastFocus = nullptr;
m_pLastWindow = nullptr;
m_lWorkspaces.clear(); m_lWorkspaces.clear();
m_lWindows.clear(); m_lWindows.clear();
@ -620,6 +623,9 @@ bool CCompositor::doesSeatAcceptInput(wlr_surface* surface) {
} }
bool CCompositor::isWindowActive(CWindow* pWindow) { bool CCompositor::isWindowActive(CWindow* pWindow) {
if (!m_pLastWindow && !m_pLastFocus)
return false;
if (!windowValidMapped(pWindow)) if (!windowValidMapped(pWindow))
return false; return false;