Commit 5756d889 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

m-default-nodes: check if node is valid before returning bound id

parent 0ff0ef77
......@@ -166,7 +166,8 @@ wp_default_nodes_api_get_default_node (WpDefaultNodesApi * self,
WP_CONSTRAINT_TYPE_PW_PROPERTY,
PW_KEY_MEDIA_CLASS, "=s", MEDIA_CLASS[node_t],
NULL);
return wp_proxy_get_bound_id (WP_PROXY (node));
if (node)
return wp_proxy_get_bound_id (WP_PROXY (node));
}
return SPA_ID_INVALID;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment