Skip to content

Commit

Permalink
Merge pull request #2689 from RisingFog/patch-1
Browse files Browse the repository at this point in the history
Fix TASInput Crash When Stick Bitmap Is Null
  • Loading branch information
skidau committed Jul 21, 2015
2 parents cd95a53 + 3639755 commit 3d6ee73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Core/DolphinWX/TASInputDlg.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 3d6ee73

Please sign in to comment.