Fix reference counting issue of the LayerSettings inside the

GdsOutputRenderer class.

The LayerSettings element is now disposed of properly.
This commit is contained in:
Mario Hüttel 2019-08-23 21:40:21 +02:00
parent cae6a9c6c3
commit 1cbacef56c
1 changed files with 2 additions and 1 deletions

View File

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