修复resname为NULL导致段错误的问题

This commit is contained in:
xue_meng_en 2023-04-24 15:17:46 +08:00
parent 96166a0be8
commit 3b3855449c

View File

@ -140,7 +140,7 @@ static status_t SetResBaseInfoInArray(ResBaseInfo *info, const cJSON *resArray,
}
resName = GetValueStrFromCJson(item, RES_NAME);
if (resName == NULL) {
resName = NULL;
resName = PRINT_NULL;
} else {
isCanPrint = CM_TRUE;
}
@ -188,7 +188,7 @@ static void PrintAllResInfoBody(const ResBaseInfo *info, const cJSON *resArray)
}
resName = GetValueStrFromCJson(item, RES_NAME);
if (resName == NULL) {
resName = NULL;
resName = PRINT_NULL;
}
resType = GetValueStrFromCJson(item, RESOURCE_TYPE);
if (resType == NULL) {