diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index f202c2c5..927c589d 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1956,7 +1956,7 @@ void CHyprRenderer::setCursorFromName(const std::string& name) { return; m_sLastCursorData.name = name; - m_sLastCursorData.surf = nullptr; + m_sLastCursorData.surf.reset(); wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, name.c_str()); } diff --git a/src/render/Renderer.hpp b/src/render/Renderer.hpp index 859d1d6a..0281d33f 100644 --- a/src/render/Renderer.hpp +++ b/src/render/Renderer.hpp @@ -84,8 +84,8 @@ class CHyprRenderer { CTimer m_tRenderTimer; struct { - wlr_surface* surf = nullptr; - std::string name; + std::optional surf = nullptr; + std::string name; } m_sLastCursorData; private: