From 3639755120815bdae5a343df0638920570cb1750 Mon Sep 17 00:00:00 2001 From: RGamma <> Date: Fri, 3 Jul 2015 11:11:21 -0400 Subject: [PATCH] Fix TASInput Crash When Stick Bitmap Is Null Patch provided by RGamma --- 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)