mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix svg crash when image file is invalid
This commit is contained in:
parent
aaa1ad796a
commit
5e3f50dc0b
@ -5,6 +5,7 @@
|
||||
* 增加widget\_on\_with\_tag和widget\_off\_by\_tag,方便一次注销多个同类事件。
|
||||
* 完善list view对wheel事件的处理。
|
||||
* 完善text selector处理up/down按键和wheel事件。
|
||||
* 修改SVG无效图片崩溃的BUG。
|
||||
|
||||
* 2019/10/19
|
||||
* 完善主题切换功能。
|
||||
|
@ -66,7 +66,8 @@ static ret_t svg_image_on_paint_self(widget_t* widget, canvas_t* c) {
|
||||
const asset_info_t* asset = svg_image->bsvg_asset;
|
||||
color_t bg = style_get_color(style, STYLE_ID_BG_COLOR, black);
|
||||
color_t fg = style_get_color(style, STYLE_ID_FG_COLOR, black);
|
||||
|
||||
return_value_if_fail(asset != NULL && asset->data != NULL, RET_FAIL);
|
||||
|
||||
return_value_if_fail(bsvg_init(&bsvg, (const uint32_t*)asset->data, asset->size) != NULL,
|
||||
RET_BAD_PARAMS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user