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



commit d1b3a1df300324f7dfe6fcb0029e370cd54b15b5
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 e174ede..19c4390 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1689,9 +1689,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]