From ab878f7479245fbb8c98d17e0f963afc0a163be7 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 6 Oct 2014 21:16:00 -0400 Subject: libnm: further NULL-vs-empty-array fixes In some cases, code may look at the value of an array-valued property during object initialization, before NMObject has set it to its actual initial value. So ensure that we initialize all such properties to an empty array, rather than leaving them NULL. Also fix another bug in NMClient that could result in priv->active_connections being NULL during certain signal emissions, and fix nm_client_get_active_connections() to not return NULL when NM was not running. --- libnm/nm-device-bridge.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libnm/nm-device-bridge.c') diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c index b4ee25b811..63d9040d49 100644 --- a/libnm/nm-device-bridge.c +++ b/libnm/nm-device-bridge.c @@ -173,7 +173,11 @@ get_hw_address (NMDevice *device) static void nm_device_bridge_init (NMDeviceBridge *device) { + NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); + _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_BRIDGE); + + priv->slaves = g_ptr_array_new (); } static void -- cgit v1.2.1