From: Sjoerd Simons <[EMAIL PROTECTED]>
Set the error if the settings don't contain a 'connection' substree. Prevents a
crash in code assuming the error is set
Signed-off-by: Sjoerd Simons <[EMAIL PROTECTED]>
---
libnm-util/nm-connection.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index 870fea5..55ba46c 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -443,6 +443,10 @@ nm_connection_verify (NMConnection *connection, GError
**error)
connection_setting = nm_connection_get_setting (connection,
NM_TYPE_SETTING_CONNECTION);
if (!connection_setting) {
g_warning ("'connection' setting not present.");
+ g_set_error (error,
+ NM_TYPE_SETTING_CONNECTION_ERROR,
+ NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
+ NM_SETTING_CONNECTION_SETTING_NAME);
return FALSE;
}
--
1.5.6.3
_______________________________________________
NetworkManager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list