From 6169275c8b318f99672fca00b48d61680ef91804 Mon Sep 17 00:00:00 2001 From: gramanas Date: Sun, 21 Oct 2018 15:35:11 +0300 Subject: Fix crash when $EDITOR is not set --- src/ckutil.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/ckutil.c b/src/ckutil.c index 9bfa139..272f737 100644 --- a/src/ckutil.c +++ b/src/ckutil.c @@ -113,6 +113,9 @@ void str_join_dirname_with_basename(char *ret, const char *dirname, } int str_is_empty(const char *s) { + if (!s) { + return 1; + } while (*s != '\0') { if (!isspace((unsigned char)*s)) { return 0; -- cgit v1.2.3