summaryrefslogtreecommitdiff
path: root/json-glib/json-array.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-glib/json-array.c')
-rw-r--r--json-glib/json-array.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index 44caf1e..f9d641e 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -556,9 +556,8 @@ json_array_add_string_element (JsonArray *array,
JsonNode *node;
g_return_if_fail (array != NULL);
- g_return_if_fail (value != NULL);
- if (value != NULL)
+ if (value != NULL && *value != '\0')
{
node = json_node_new (JSON_NODE_VALUE);
json_node_set_string (node, value);