mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
introspect: avoid NULL pointers
This commit is contained in:
parent
b055748b1c
commit
4edda643e8
1 changed files with 7 additions and 2 deletions
|
|
@ -55,10 +55,15 @@ G_STMT_START {
|
||||||
|
|
||||||
#define SET_PROPERTIES(name, field, idx) \
|
#define SET_PROPERTIES(name, field, idx) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
|
GVariant *variant; \
|
||||||
if (!changed || g_hash_table_contains (changed, name)) \
|
if (!changed || g_hash_table_contains (changed, name)) \
|
||||||
info->change_mask |= 1 << idx; \
|
info->change_mask |= 1 << idx; \
|
||||||
info->field = pinos_properties_from_variant ( \
|
if ((variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), name))) { \
|
||||||
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
|
} G_STMT_END
|
||||||
|
|
||||||
#define SET_BYTES(name, field, idx) \
|
#define SET_BYTES(name, field, idx) \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue