From 0627d1f093db4064c114e8fb2a2a8e824fb606bb Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 10 Dec 2019 12:51:30 -0500 Subject: Configuration++ --- config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index b0bfc81..6e6ae8a 100644 --- a/config.c +++ b/config.c @@ -154,6 +154,9 @@ void config_free(ConfigItem **item) { /// \param key search for key in config records /// \return success=pointer to record, failure=NULL ConfigItem *config_get(ConfigItem **item, const char *key) { + if (!item) { + return NULL; + } for (int i = 0; item[i] != NULL; i++) { if (!strcmp(item[i]->key, key)) { return item[i]; -- cgit