diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-11-07 05:05:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-07 05:05:37 +0100 |
| commit | ee7887b7511dd3cdb27fd8517d42088cf26cdade (patch) | |
| tree | cff8eaf076c6f07a006f79a582ca5a74cf977712 /Source/Core/DolphinQt/RenderWidget.cpp | |
| parent | c931529e7aa5926b8a21a193bf8f80244b3ae888 (diff) | |
| parent | a98df1894705195f7051ef1dfccafffe135149c5 (diff) | |
Merge pull request #11258 from AdmiralCurtiss/imgui-crash-v2
ImGui render context race condition fix: Lock context during Init/Shutdown.
Diffstat (limited to 'Source/Core/DolphinQt/RenderWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/RenderWidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp index cb55877ace..891d3614c8 100644 --- a/Source/Core/DolphinQt/RenderWidget.cpp +++ b/Source/Core/DolphinQt/RenderWidget.cpp @@ -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); } |
