Skip to content

Commit c614a70

Browse files
committed
Merge pull request #92 from Tilka/tab_crash
Fix crash when pressing Tab
2 parents 4f3227b + 296637d commit c614a70

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Source/Core/DolphinWX/Frame.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,13 +706,16 @@ bool CFrame::RendererHasFocus()
706706
if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
707707
return true;
708708
#else
709-
if (wxWindow::FindFocus() == nullptr)
709+
wxWindow *window = wxWindow::FindFocus();
710+
if (window == nullptr)
710711
return false;
711712
// Why these different cases?
712-
if (m_RenderParent == wxWindow::FindFocus() ||
713-
m_RenderParent == wxWindow::FindFocus()->GetParent() ||
714-
m_RenderParent->GetParent() == wxWindow::FindFocus()->GetParent())
713+
if (m_RenderParent == window ||
714+
m_RenderParent == window->GetParent() ||
715+
m_RenderParent->GetParent() == window->GetParent())
716+
{
715717
return true;
718+
}
716719
#endif
717720
return false;
718721
}

0 commit comments

Comments
 (0)