From fd3a1cd086d077c39c5634ff6c9be9893857dc55 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:17:31 +0000 Subject: [PATCH] fix crash with libc++ in appid --- src/managers/XWaylandManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 17efa9a2..d67441c7 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -110,14 +110,14 @@ std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) { std::string CHyprXWaylandManager::getAppIDClass(CWindow* pWindow) { try { if (pWindow->m_bIsX11) { - if (pWindow->m_uSurface.xwayland) { + if (pWindow->m_uSurface.xwayland && pWindow->m_uSurface.xwayland->_class) { if (!pWindow->m_bMappedX11 || !pWindow->m_bIsMapped) return "unmanaged X11"; return std::string(pWindow->m_uSurface.xwayland->_class); } } else if (pWindow->m_uSurface.xdg) { - if (pWindow->m_uSurface.xdg->toplevel) { + if (pWindow->m_uSurface.xdg->toplevel && pWindow->m_uSurface.xdg->toplevel->app_id) { return std::string(pWindow->m_uSurface.xdg->toplevel->app_id); } } else {