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.
This commit is contained in:
Tom Englund 2024-07-06 12:24:29 +02:00 committed by GitHub
parent 6e0921140e
commit 7fb3c03500
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -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