From 72c8e4ab84b72b1940492fe82bbafd6a3c6ebe4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 2 Jun 2025 20:10:45 +0200 Subject: [PATCH] clapper: Fix missing pspec ref when copying proxy Newly created enhancer proxies hold param specs with a reference on each and unref them when finalized. For this reason, copied proxy objects needs to ref pspecs from source, otherwise it would do an unref without holding a reference on object during destruction. --- src/lib/clapper/clapper-enhancer-proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/clapper/clapper-enhancer-proxy.c b/src/lib/clapper/clapper-enhancer-proxy.c index 04e9adc2..2b78ed5e 100644 --- a/src/lib/clapper/clapper-enhancer-proxy.c +++ b/src/lib/clapper/clapper-enhancer-proxy.c @@ -213,7 +213,7 @@ clapper_enhancer_proxy_copy (ClapperEnhancerProxy *src_proxy, const gchar *copy_ copy->pspecs = g_new (GParamSpec *, copy->n_pspecs); for (i = 0; i < src_proxy->n_pspecs; ++i) - copy->pspecs[i] = src_proxy->pspecs[i]; + copy->pspecs[i] = g_param_spec_ref (src_proxy->pspecs[i]); copy->scope = CLAPPER_ENHANCER_PARAM_LOCAL;