From 7fb3c03500761b576257aafe64181bfe29d66a26 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sat, 6 Jul 2024 12:24:29 +0200 Subject: [PATCH] hyprlock: ensure members are accessed direct (#404) if the unique_ptr is reset directly accessing it from the destructor causes crashes on Clang/libc++, just access the members directly. --- src/core/hyprlock.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 05eda53..7d07272 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -40,14 +40,14 @@ CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediate) { } CHyprlock::~CHyprlock() { - if (g_pHyprlock->dma.gbmDevice) - gbm_device_destroy(g_pHyprlock->dma.gbmDevice); + if (dma.gbmDevice) + gbm_device_destroy(dma.gbmDevice); - if (g_pHyprlock->m_pXKBState) - xkb_state_unref(g_pHyprlock->m_pXKBState); + if (m_pXKBState) + xkb_state_unref(m_pXKBState); - if (g_pHyprlock->m_pXKBKeymap) - xkb_keymap_unref(g_pHyprlock->m_pXKBKeymap); + if (m_pXKBKeymap) + xkb_keymap_unref(m_pXKBKeymap); } // wl_seat