From 602cc63c96cb4efbdb9c7b515f0d19b81220cedf Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 24 Dec 2017 22:36:34 +0100 Subject: [PATCH] Update assert --- example/ex-multi03.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ex-multi03.c b/example/ex-multi03.c index 0b9a4512..463203cc 100644 --- a/example/ex-multi03.c +++ b/example/ex-multi03.c @@ -112,7 +112,7 @@ void json_clear (json_t p) void json_init_set(json_t *p, json_t o) { - assert (p != NULL); + assert (p != NULL && o != NULL); *p = malloc (sizeof (struct json_node_s)); if (*p == NULL) abort(); variant_json_init_set((*p)->json, o->json); @@ -120,7 +120,7 @@ void json_init_set(json_t *p, json_t o) void json_set(json_t *p, json_t o) { - assert (p != NULL); + assert (p != NULL && *p != NULL && o != NULL); variant_json_set((*p)->json, o->json); }