summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/RenderWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinQt/RenderWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/RenderWidget.cpp3
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);
}