mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 09:18:03 +02:00
object-interest: initialize GValue passed to g_object_get_property
g_object_get_property did not support uninitialized GValues prior to GLib 2.60, and it's not worth requiring 2.60 for this reason Fixes #11
This commit is contained in:
parent
707518937a
commit
1563eeeae6
1 changed files with 4 additions and 1 deletions
|
|
@ -761,11 +761,14 @@ wp_object_interest_matches_full (WpObjectInterest * self,
|
|||
}
|
||||
case WP_CONSTRAINT_TYPE_G_PROPERTY: {
|
||||
GType value_type;
|
||||
GParamSpec *pspec = NULL;
|
||||
|
||||
if (object)
|
||||
exists = !!g_object_class_find_property (G_OBJECT_GET_CLASS (object), c->subject);
|
||||
exists = !!(pspec = g_object_class_find_property (
|
||||
G_OBJECT_GET_CLASS (object), c->subject));
|
||||
|
||||
if (exists && c->subject_type) {
|
||||
g_value_init (&value, pspec->value_type);
|
||||
g_object_get_property (object, c->subject, &value);
|
||||
value_type = G_VALUE_TYPE (&value);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue