From a5a787eac52734a926d39e958d22b87a450d42aa Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 29 Dec 2009 16:23:44 +0100 Subject: Check if error is non-NULL in conf_get_int. --- walls_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/walls_conf.c b/walls_conf.c index 9eb4fdc..7b31d13 100644 --- a/walls_conf.c +++ b/walls_conf.c @@ -37,7 +37,7 @@ gint conf_get_int(const gchar *group_name, const gchar *key, gint _default) { ret = g_key_file_get_integer(keyfile, group_name, key, &error); - if(ret == 0) { + if(ret == 0 && error) { g_warning("Can't get key from config: %s", error->message); g_error_free(error); return _default; -- cgit v1.2.3