mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Merge pull request #4154 from ogniK5377/swkbd-nullptr
Prevent nullptr dereference on swkbd error case
This commit is contained in:
commit
705cccb1e4
|
@ -60,7 +60,7 @@ void SoftwareKeyboard::Initialize() {
|
||||||
std::memcpy(&config, keyboard_config.data(), sizeof(KeyboardConfig));
|
std::memcpy(&config, keyboard_config.data(), sizeof(KeyboardConfig));
|
||||||
|
|
||||||
const auto work_buffer_storage = broker.PopNormalDataToApplet();
|
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();
|
const auto& work_buffer = work_buffer_storage->GetData();
|
||||||
|
|
||||||
if (config.initial_string_size == 0)
|
if (config.initial_string_size == 0)
|
||||||
|
|
Loading…
Reference in a new issue