1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

indev: fix possible null pointer dereference

This commit is contained in:
Gabor Kiss-Vamosi 2020-04-26 10:18:49 +02:00
parent 9fe050dcb9
commit 930332ed99

View File

@ -797,7 +797,7 @@ static void indev_proc_press(lv_indev_proc_t * proc)
}
/*Do not use disabled objects*/
if((lv_obj_get_state(indev_obj_act, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED)) {
if(indev_obj_act && (lv_obj_get_state(indev_obj_act, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED)) {
indev_obj_act = proc->types.pointer.act_obj;
}