[network-manager-applet] Fix a crash
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] Fix a crash
- Date: Wed, 2 May 2012 17:22:14 +0000 (UTC)
commit c89ff1af8dfa112deda8e9f4677f27a875ec67ec
Author: Dan Winship <danw gnome org>
Date: Wed May 2 13:20:35 2012 -0400
Fix a crash
nm_client_get_devices() returns NULL, not a 0-length array, if there
are no devices.
https://bugzilla.redhat.com/show_bug.cgi?id=815440
src/libnm-gtk/nm-wireless-dialog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libnm-gtk/nm-wireless-dialog.c b/src/libnm-gtk/nm-wireless-dialog.c
index 7c77515..73feb81 100644
--- a/src/libnm-gtk/nm-wireless-dialog.c
+++ b/src/libnm-gtk/nm-wireless-dialog.c
@@ -643,7 +643,7 @@ device_combo_init (NMAWirelessDialog *self, NMDevice *device)
num_added++;
} else {
devices = nm_client_get_devices (priv->client);
- if (devices->len == 0)
+ if (!devices)
return FALSE;
for (i = 0; devices && (i < devices->len); i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]