mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2025-05-12 21:30:36 +01:00
core: fix memory leak by freeing rsvg handle (#77)
This commit is contained in:
parent
9c5dd1f7c8
commit
dcadd3398a
1 changed files with 2 additions and 0 deletions
|
@ -572,12 +572,14 @@ bool CHyprcursorManager::loadThemeStyle(const SCursorStyleInfo& info) {
|
|||
|
||||
if (!rsvg_handle_render_document(handle, PCAIRO, &rect, &error)) {
|
||||
Debug::log(HC_LOG_ERR, logFn, "Failed rendering svg: {}", error->message);
|
||||
g_object_unref(handle);
|
||||
return false;
|
||||
}
|
||||
|
||||
// done
|
||||
cairo_surface_flush(newImage->cairoSurface);
|
||||
cairo_destroy(PCAIRO);
|
||||
g_object_unref(handle);
|
||||
}
|
||||
} else {
|
||||
Debug::log(HC_LOG_ERR, logFn, "Invalid shapetype in loadThemeStyle");
|
||||
|
|
Loading…
Reference in a new issue