From 1cbacef56c4bda7d19fe61f942c37d9276a8fece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 23 Aug 2019 21:40:21 +0200 Subject: [PATCH] Fix reference counting issue of the LayerSettings inside the GdsOutputRenderer class. The LayerSettings element is now disposed of properly. --- output-renderers/gds-output-renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/output-renderers/gds-output-renderer.c b/output-renderers/gds-output-renderer.c index bb55340..2344126 100644 --- a/output-renderers/gds-output-renderer.c +++ b/output-renderers/gds-output-renderer.c @@ -262,9 +262,10 @@ LayerSettings *gds_output_renderer_get_and_ref_layer_settings(GdsOutputRenderer /* Acquire settings lock */ g_mutex_lock(&priv->settings_lock); + /* This function seems to already reference the LayerSettings object */ g_object_get(renderer, "layer-settings", &ret, NULL); /* Reference it, so it is not cleared by another thread overwriting the property */ - g_object_ref(ret); + //g_object_ref(ret); /* It is now safe to clear the lock */ g_mutex_unlock(&priv->settings_lock);