mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07: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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user