From 2cfc1eac51a3b28ad1f3cf35be841964d394ffd1 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Wed, 8 Oct 2014 09:46:28 -0400 Subject: [PATCH] Fix another crash in tas input. --- Source/Core/DolphinWX/TASInputDlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index b2d2e88cee..a3c9df36f1 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -169,7 +169,6 @@ void TASInputDlg::CreateGCLayout() { if (hasLayout) return; - hasLayout = true; Buttons[6] = &X; Buttons[7] = &Y; @@ -250,6 +249,8 @@ void TASInputDlg::CreateGCLayout() main_szr->Add(bottom_box); SetSizerAndFit(main_szr); ResetValues(); + + hasLayout = true; } @@ -620,6 +621,8 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event) bool TASInputDlg::TASHasFocus() { + if (!hasLayout) + return false; //allows numbers to be used as hotkeys for (unsigned int i = 0; i < 10; ++i) {