fixup! feat(ui): improve the event and loading logic of image loader

This commit is contained in:
Liu
2024-12-07 13:30:30 +08:00
parent a6bbf43ac6
commit 0c9abbe15b
+1 -1
View File
@@ -58,7 +58,7 @@ LIBUI_PUBLIC ui_image_t *ui_image_create(const char *path);
LIBUI_INLINE bool ui_image_valid(ui_image_t *image)
{
return image->error == PD_OK && image->state == UI_IMAGE_STATE_COMPLETE;
return image != NULL && image->error == PD_OK && image->state == UI_IMAGE_STATE_COMPLETE;
}
LIBUI_PUBLIC void ui_image_destroy(ui_image_t *image);