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.
This commit is contained in:
Rafał Dzięgiel
2025-06-02 20:10:45 +02:00
parent db61b9c773
commit 72c8e4ab84

View File

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