From e125603450b5ef104f0ae6951c86d36282be141d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 3 Jul 2015 12:11:57 +0200 Subject: [PATCH] libnm-core: don't assert in nm_connection_get_uuid() for valid connection We want to call nm_connection_get_uuid() also on connections that don't verify. Otherwise it is chumbersome to check first for verified connection. (cherry picked from commit 61eed191a93d26af278fc35862d8aa547037f0fa) --- libnm-core/nm-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index acdc8b89c7..8f226582cd 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -1498,7 +1498,8 @@ nm_connection_get_uuid (NMConnection *connection) g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); s_con = nm_connection_get_setting_connection (connection); - g_return_val_if_fail (s_con != NULL, NULL); + if (!s_con) + return NULL; return nm_setting_connection_get_uuid (s_con); }