[network-manager-applet] core: be more resilient to D-Bus method call errors (rh #582938)



commit cd1cb9193440df97bcfc2f0c313b72eb095a59dc
Author: Dan Williams <dcbw redhat com>
Date:   Sun Apr 25 00:09:43 2010 -0700

    core: be more resilient to D-Bus method call errors (rh #582938)

 src/applet.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index cf9b388..79c76cf 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1980,9 +1980,14 @@ applet_get_exported_connection_for_device (NMDevice *device, NMApplet *applet)
 		const GPtrArray *devices;
 
 		active = g_ptr_array_index (active_connections, i);
+		if (!active)
+			continue;
+
 		devices = nm_active_connection_get_devices (active);
 		service_name = nm_active_connection_get_service_name (active);
 		connection_path = nm_active_connection_get_connection (active);
+		if (!devices || !service_name || !connection_path)
+			continue;
 
 		if (strcmp (service_name, NM_DBUS_SERVICE_USER_SETTINGS) != 0)
 			continue;



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