summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.c3
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;