diff options
Diffstat (limited to 'src/basic/hashmap.c')
-rw-r--r-- | src/basic/hashmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 9ed69bd3d2..0decbb04e1 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1761,6 +1761,9 @@ char** _hashmap_get_strv(HashmapBase *h) { Iterator i; unsigned idx, n; + if (!h) + return new0(char*, 1); + sv = new(char*, n_entries(h)+1); if (!sv) return NULL; |