NDK C-Api ImageAlt 参数校验

Signed-off-by: aryawang <wangcaihui@huawei.com>
Change-Id: I4f38481d8727af769a9a47365b3a2592508cbdd6
This commit is contained in:
aryawang 2024-06-17 06:41:18 +00:00
parent 08785b2137
commit 9001322542

View File

@ -9549,7 +9549,7 @@ int32_t SetAutoResize(ArkUI_NodeHandle node, const ArkUI_AttributeItem* item)
int32_t SetAlt(ArkUI_NodeHandle node, const ArkUI_AttributeItem* item)
{
if (!item || !item->string || !item->object) {
if (!item || (!item->string && !item->object)) {
return ERROR_CODE_PARAM_INVALID;
}
auto* fullImpl = GetFullImpl();