diff --git a/source/client/src/clientSmlJson.c b/source/client/src/clientSmlJson.c index bff4f49735345e56d1db29e2a478814a956f8546..31b0ed455b0c8c4cb9c385d5daf4762052e77741 100644 --- a/source/client/src/clientSmlJson.c +++ b/source/client/src/clientSmlJson.c @@ -342,8 +342,8 @@ int smlJsonParseObjFirst(char **start, SSmlLineInfo *element, int8_t *offset){ (*start)++; } - if(unlikely(index != OTD_JSON_FIELDS_NUM)) { - uError("elements != %d", OTD_JSON_FIELDS_NUM) + if(unlikely(index != OTD_JSON_FIELDS_NUM) || element->tags == NULL || element->cols == NULL || element->measure == NULL || element->timestamp == NULL) { + uError("elements != %d or element parse null", OTD_JSON_FIELDS_NUM) return -1; } return 0;