summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 94698837dc..763909e26b 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -722,7 +722,11 @@ bool CFrame::RendererHasFocus()
if (m_RenderParent == nullptr)
return false;
#ifdef _WIN32
- if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
+ HWND window = GetForegroundWindow();
+ if (window == nullptr)
+ return false;
+
+ if (m_RenderFrame->GetHWND() == window)
return true;
#else
wxWindow *window = wxWindow::FindFocus();