From f2c4aadfe1823ae71c2b14271fe62c82dd559f4e Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Wed, 2 Jan 2019 15:08:56 -0600 Subject: [PATCH] Don't dirty heap if the action deletes the button --- lv_objx/lv_btn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index b8f40a651..06040df8b 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -684,7 +684,9 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) res = ext->actions[LV_BTN_ACTION_CLICK](btn); } } - ext->long_pr_action_executed = 0; + if( LV_RES_INV != res ) { + ext->long_pr_action_executed = 0; + } } } else if(sign == LV_SIGNAL_CLEANUP) { #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT