From 815922c4c7a0ff6db3f57967fd74a3bad2f7b640 Mon Sep 17 00:00:00 2001 From: portix Date: Mon, 19 Mar 2012 09:49:09 +0100 Subject: Check if str is NULL in util_str_chug, closing #133 --- src/util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 0e09713d..783df35a 100644 --- a/src/util.c +++ b/src/util.c @@ -688,6 +688,8 @@ util_strlen_trailing_space(const char *str) { } const char * util_str_chug(const char *str) { + if (str == NULL) + return str; while (g_ascii_isspace(*str)) str++; return str; -- cgit v1.2.3