[gupnp/gupnp-1.4] RootDevice: Do not overwrite document with NULL
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp/gupnp-1.4] RootDevice: Do not overwrite document with NULL
- Date: Sun, 2 Jan 2022 20:21:37 +0000 (UTC)
commit f7fc650b4ce2fbb3130ea36e19c9d9e76848aee6
Author: Jens Georg <mail jensge org>
Date: Sun Jan 2 21:21:14 2022 +0100
RootDevice: Do not overwrite document with NULL
libgupnp/gupnp-root-device.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp/gupnp-root-device.c b/libgupnp/gupnp-root-device.c
index d46aa05..2ebdc6d 100644
--- a/libgupnp/gupnp-root-device.c
+++ b/libgupnp/gupnp-root-device.c
@@ -127,8 +127,10 @@ gupnp_root_device_set_property (GObject *object,
switch (property_id) {
case PROP_DESCRIPTION_DOC:
- _gupnp_device_info_set_document (GUPNP_DEVICE_INFO (device),
- g_value_get_object (value));
+ if (g_value_get_object (value) != NULL)
+ _gupnp_device_info_set_document (
+ GUPNP_DEVICE_INFO (device),
+ g_value_get_object (value));
break;
case PROP_DESCRIPTION_PATH:
priv->description_path = g_value_dup_string (value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]