From b9bd9ea3d0838c1011e0e815c69141675ee256d6 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 24 Apr 2020 12:16:32 +0200 Subject: [PATCH] core: only softlock when PIN is set --- core/src/apps/base.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/apps/base.py b/core/src/apps/base.py index 7956f940e7..ac2fa3b791 100644 --- a/core/src/apps/base.py +++ b/core/src/apps/base.py @@ -130,9 +130,10 @@ def set_homescreen() -> None: def lock_device() -> None: - config.lock() - set_homescreen() - wire.find_handler = get_pinlocked_handler + if config.has_pin(): + config.lock() + set_homescreen() + wire.find_handler = get_pinlocked_handler async def unlock_device(ctx: wire.GenericContext = wire.DUMMY_CONTEXT) -> None: