From 0268bb9888abf3d3e007960770f3a01385385702 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 23 Mar 2023 00:22:43 +0000 Subject: [PATCH] surface: set to nullptr after destroy() --- src/helpers/WLSurface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/WLSurface.cpp b/src/helpers/WLSurface.cpp index 889e9885..38c31e1a 100644 --- a/src/helpers/WLSurface.cpp +++ b/src/helpers/WLSurface.cpp @@ -33,6 +33,8 @@ void CWLSurface::destroy() { if (g_pCompositor->m_pLastFocus == m_pWLRSurface) g_pCompositor->m_pLastFocus = nullptr; + m_pWLRSurface = nullptr; + Debug::log(LOG, "CWLSurface %x called destroy()", this); }