summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-03-19 09:49:09 +0100
committerportix <portix@gmx.net>2012-03-19 09:49:09 +0100
commit815922c4c7a0ff6db3f57967fd74a3bad2f7b640 (patch)
tree651206123216cdd29e6af7e33e9e74c52413962f /src/util.c
parent33e74f3f0fd1020393854143c826196ff1c00eaf (diff)
downloaddwb-815922c4c7a0ff6db3f57967fd74a3bad2f7b640.zip
Check if str is NULL in util_str_chug, closing #133
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 2 insertions, 0 deletions
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;