From 6b2579fcdfdf90e58d56060169e2cbe1ec694a7c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 5 Apr 2014 09:42:00 -0400 Subject: keyfile: don't g_return_if_fail() on bad user input return-if-fail is only for programmer errors --- src/settings/plugins/keyfile/reader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/settings') diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c index a157dc1334..03e1c344ee 100644 --- a/src/settings/plugins/keyfile/reader.c +++ b/src/settings/plugins/keyfile/reader.c @@ -277,7 +277,8 @@ read_field (char **current, char **error, const char *characters, const char *de } /* fail on empty input */ - g_return_val_if_fail (**current, NULL); + if (!**current) + return NULL; /* remember beginning of input */ start = *current; -- cgit v1.2.1