From d13189d8f63d51f8b08b70e40f84e6f40f8eb417 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 8 Jul 2024 15:28:36 +0200 Subject: [PATCH] no leakeroni --- src/managers/CursorManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 195b0c88..8e8cf1db 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -418,6 +418,8 @@ void CCursorManager::SXCursorManager::loadTheme(const std::string& name, int siz themeLoaded = true; + XcursorImageDestroy(img); + // gather as many shapes as we can find. cursors.clear(); @@ -450,5 +452,7 @@ void CCursorManager::SXCursorManager::loadTheme(const std::string& name, int siz std::memcpy(xcursor->pixels.data(), xImage->pixels, xImage->width * xImage->height * sizeof(uint32_t)); cursors.emplace(std::string{shape}, xcursor); + + XcursorImageDestroy(xImage); } }