From 047b80de741fee39dabbc91dd00702e94f4084a3 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 22 Oct 2014 15:11:12 +0200 Subject: settings: shortcut nm_settings_get_connection_by_uuid() if @uuid is invalid Signed-off-by: Thomas Haller --- src/settings/nm-settings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index a1e1d9b7de..647f5dac03 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -301,6 +301,9 @@ nm_settings_get_connection_by_uuid (NMSettings *self, const char *uuid) g_return_val_if_fail (NM_IS_SETTINGS (self), NULL); g_return_val_if_fail (uuid != NULL, NULL); + if (!nm_utils_is_uuid (uuid)) + return NULL; + priv = NM_SETTINGS_GET_PRIVATE (self); g_hash_table_iter_init (&iter, priv->connections); -- cgit v1.2.1