mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
introspect: avoid NULL pointers
This commit is contained in:
parent
b055748b1c
commit
4edda643e8
|
@ -55,10 +55,15 @@ G_STMT_START {
|
|||
|
||||
#define SET_PROPERTIES(name, field, idx) \
|
||||
G_STMT_START { \
|
||||
GVariant *variant; \
|
||||
if (!changed || g_hash_table_contains (changed, name)) \
|
||||
info->change_mask |= 1 << idx; \
|
||||
info->field = pinos_properties_from_variant ( \
|
||||
g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), name)); \
|
||||
if ((variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), name))) { \
|
||||
info->field = pinos_properties_from_variant (variant); \
|
||||
g_variant_unref (variant); \
|
||||
} else { \
|
||||
info->field = NULL; \
|
||||
} \
|
||||
} G_STMT_END
|
||||
|
||||
#define SET_BYTES(name, field, idx) \
|
||||
|
|
Loading…
Reference in a new issue