diff --git a/es-app/src/views/UIModeController.cpp b/es-app/src/views/UIModeController.cpp index 8c96bb349..f6239ecb2 100644 --- a/es-app/src/views/UIModeController.cpp +++ b/es-app/src/views/UIModeController.cpp @@ -39,6 +39,12 @@ UIModeController::UIModeController() { mPassKeySequence = Settings::getInstance()->getString("UIMode_passkey"); mCurrentUIMode = Settings::getInstance()->getString("UIMode"); + // Handle a potentially invalid entry in the configuration file. + if (mCurrentUIMode != "full" && mCurrentUIMode != "kid" && mCurrentUIMode != "kiosk") { + mCurrentUIMode = "full"; + Settings::getInstance()->setString("UIMode", mCurrentUIMode); + Settings::getInstance()->saveFile(); + } } void UIModeController::monitorUIMode()