summaryrefslogtreecommitdiff
path: root/src/basic/string-table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/string-table.h')
-rw-r--r--src/basic/string-table.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/string-table.h b/src/basic/string-table.h
index d88625fca7..369610efc8 100644
--- a/src/basic/string-table.h
+++ b/src/basic/string-table.h
@@ -48,6 +48,8 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
#define _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(name,type,yes,scope) \
scope type name##_from_string(const char *s) { \
int b; \
+ if (!s) \
+ return -1; \
b = parse_boolean(s); \
if (b == 0) \
return (type) 0; \