diff options
-rw-r--r-- | src/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index 0b2ed31d..2d5bcb0e 100644 --- a/src/utils.c +++ b/src/utils.c @@ -73,6 +73,9 @@ const char *get_value_string_or_null(const struct value_string *vs, { int i; + if (!vs) + return NULL; + for (i = 0;; i++) { if (vs[i].value == 0 && vs[i].str == NULL) break; |