From a522aa5bfcba407f30d98c39955f03acb8d15dd1 Mon Sep 17 00:00:00 2001 From: skidau Date: Tue, 21 Jul 2015 11:41:38 +1000 Subject: [PATCH] Merge pull request #2689 from RisingFog/patch-1 Fix TASInput Crash When Stick Bitmap Is Null --- Source/Core/DolphinWX/TASInputDlg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index 40ced03275..c921be7497 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -868,7 +868,9 @@ void TASInputDlg::UpdateStickBitmap(Stick stick) x = 256 - (u8)x; if (stick.y_cont.reverse) y = 256 - (u8)y; - stick.bitmap->SetBitmap(CreateStickBitmap(x, y)); + // If TASInputDlg::UpdateFromText(wxCommandEvent&) interrupts stick initialization, this bitmap is a nullptr + if (stick.bitmap != nullptr) + stick.bitmap->SetBitmap(CreateStickBitmap(x, y)); } void TASInputDlg::OnCloseWindow(wxCloseEvent& event)