1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Fix a null indev input in lv_indev_wait_release()

Will crash on calling while no indev returned conditions, such as delayed for an deletion of objects automatically when idle(no interactive inputs).
Perhaps we will think of that it is "your" responsibility to check before calling. well, I think it may not be easy for the one who does not familar with the library, and I stucked here and debug for hours.
This commit is contained in:
Samuel 2020-03-26 14:08:25 +08:00 committed by GitHub
parent 80973db76e
commit e655373df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,6 +297,7 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point)
*/ */
void lv_indev_wait_release(lv_indev_t * indev) void lv_indev_wait_release(lv_indev_t * indev)
{ {
if(indev == NULL)return;
indev->proc.wait_until_release = 1; indev->proc.wait_until_release = 1;
} }