diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 0c17fce4c6..143d4570e4 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -284,7 +284,7 @@ static void button_tick(void) #else if (btn == POWEROFF_BUTTON && #endif -#ifndef HAVE_POWEROFF_WHILE_CHARGING +#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) !charger_inserted() && #endif repeat_count > POWEROFF_COUNT)