Skip to content
Snippets Groups Projects
Commit 917a019b authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

lib: return empty WpProperties if the info struct has no properties on SM objects

parent a7d657a1
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,8 @@ wp_endpoint_link_get_properties (WpProxy * proxy)
WpEndpointLink *self = WP_ENDPOINT_LINK (proxy);
WpEndpointLinkPrivate *priv = wp_endpoint_link_get_instance_private (self);
return wp_properties_ref (priv->properties);
return priv->properties ?
wp_properties_ref (priv->properties) : wp_properties_new_empty ();
}
static struct spa_param_info *
......
......@@ -80,7 +80,8 @@ wp_endpoint_stream_get_properties (WpProxy * proxy)
WpEndpointStream *self = WP_ENDPOINT_STREAM (proxy);
WpEndpointStreamPrivate *priv = wp_endpoint_stream_get_instance_private (self);
return wp_properties_ref (priv->properties);
return priv->properties ?
wp_properties_ref (priv->properties) : wp_properties_new_empty ();
}
static struct spa_param_info *
......
......@@ -173,7 +173,8 @@ wp_endpoint_get_properties (WpProxy * proxy)
WpEndpoint *self = WP_ENDPOINT (proxy);
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
return wp_properties_ref (priv->properties);
return priv->properties ?
wp_properties_ref (priv->properties) : wp_properties_new_empty ();
}
static struct spa_param_info *
......
......@@ -193,7 +193,8 @@ wp_session_get_properties (WpProxy * proxy)
WpSession *self = WP_SESSION (proxy);
WpSessionPrivate *priv = wp_session_get_instance_private (self);
return wp_properties_ref (priv->properties);
return priv->properties ?
wp_properties_ref (priv->properties) : wp_properties_new_empty ();
}
static struct spa_param_info *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment