From 510838759f2315f21b0dcb8b27f840b489e1f63c Mon Sep 17 00:00:00 2001 From: David Marcec Date: Thu, 25 Jun 2020 00:25:15 +1000 Subject: Prevent nullptr dereference on swkbd error case --- src/core/hle/service/am/applets/software_keyboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp index d14076b02..fbe3686ae 100644 --- a/src/core/hle/service/am/applets/software_keyboard.cpp +++ b/src/core/hle/service/am/applets/software_keyboard.cpp @@ -60,7 +60,7 @@ void SoftwareKeyboard::Initialize() { std::memcpy(&config, keyboard_config.data(), sizeof(KeyboardConfig)); const auto work_buffer_storage = broker.PopNormalDataToApplet(); - ASSERT(work_buffer_storage != nullptr); + ASSERT_OR_EXECUTE(work_buffer_storage != nullptr, { return; }); const auto& work_buffer = work_buffer_storage->GetData(); if (config.initial_string_size == 0) -- cgit v1.2.3