mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
wxWindow::FindFocus() sometimes return NULL, check for that to avoid segfaulting
This commit is contained in:
parent
e09dd77914
commit
c08510baa8
@ -371,5 +371,11 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event)
|
|||||||
|
|
||||||
bool TASInputDlg::HasFocus()
|
bool TASInputDlg::HasFocus()
|
||||||
{
|
{
|
||||||
return (wxWindow::FindFocus() == this || wxWindow::FindFocus()->GetParent() == this);
|
if (wxWindow::FindFocus() == this)
|
||||||
|
return true;
|
||||||
|
else if (wxWindow::FindFocus() != NULL &&
|
||||||
|
wxWindow::FindFocus()->GetParent() == this)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user