[MM] [PATCH] iface-modem-3gpp-ussd: avoid update if object skeleton is NULL



---
 src/mm-iface-modem-3gpp-ussd.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/mm-iface-modem-3gpp-ussd.c b/src/mm-iface-modem-3gpp-ussd.c
index 46bd5a4..d92362c 100644
--- a/src/mm-iface-modem-3gpp-ussd.c
+++ b/src/mm-iface-modem-3gpp-ussd.c
@@ -408,6 +408,9 @@ mm_iface_modem_3gpp_ussd_update_state (MMIfaceModem3gppUssd *self,
                   MM_IFACE_MODEM_3GPP_USSD_DBUS_SKELETON, &skeleton,
                   NULL);
 
+    if (!skeleton)
+      return;
+
     old_state = (MMModem3gppUssdSessionState) mm_gdbus_modem3gpp_ussd_get_state (skeleton);
 
     if (old_state != new_state)
@@ -426,6 +429,9 @@ mm_iface_modem_3gpp_ussd_update_network_notification (MMIfaceModem3gppUssd *self
                   MM_IFACE_MODEM_3GPP_USSD_DBUS_SKELETON, &skeleton,
                   NULL);
 
+    if (!skeleton)
+      return;
+
     mm_gdbus_modem3gpp_ussd_set_network_notification (skeleton,
                                                       network_notification);
     g_object_unref (skeleton);
@@ -441,6 +447,9 @@ mm_iface_modem_3gpp_ussd_update_network_request (MMIfaceModem3gppUssd *self,
                   MM_IFACE_MODEM_3GPP_USSD_DBUS_SKELETON, &skeleton,
                   NULL);
 
+    if (!skeleton)
+      return;
+
     mm_gdbus_modem3gpp_ussd_set_network_request (skeleton,
                                                  network_request);
     g_object_unref (skeleton);
-- 
1.7.7.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]