mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-21 03:54:57 +00:00
RenderWidget: Fix random crash due to missing ImGui context
`ImGui::GetIO` performs an assertion that a context exists, and if one doesn't then things will likely crash. Unfortunately this crash is hard to consistently reproduce.
This commit is contained in:
parent
c931529e7a
commit
e37aa3ed90
1 changed files with 3 additions and 0 deletions
|
@ -554,6 +554,9 @@ void RenderWidget::SetImGuiKeyMap()
|
|||
}};
|
||||
auto lock = g_renderer->GetImGuiLock();
|
||||
|
||||
if (!ImGui::GetCurrentContext())
|
||||
return;
|
||||
|
||||
for (auto [imgui_key, qt_key] : key_map)
|
||||
ImGui::GetIO().KeyMap[imgui_key] = (qt_key & 0x1FF);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue