From 00f6b7b6ea649893b2d9caabd019e6ebb1266627 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 26 May 2012 08:24:18 -0500 Subject: [PATCH] Fix core dump on start up on linux. Thanks to degasus. --- Source/Core/DolphinWX/Src/TASInputDlg.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.cpp b/Source/Core/DolphinWX/Src/TASInputDlg.cpp index 1c2182e7d2..e566068ff1 100644 --- a/Source/Core/DolphinWX/Src/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/Src/TASInputDlg.cpp @@ -53,6 +53,9 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxBoxSizer* const main_yslider_box = new wxBoxSizer(wxVERTICAL); wxBoxSizer* const main_stick_box = new wxBoxSizer(wxVERTICAL); + static_bitmap_main = new wxStaticBitmap(this, ID_MAIN_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); + static_bitmap_main->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpL), NULL, this); + static_bitmap_main->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpR), NULL, this); wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_mainX_s->SetMinSize(wxSize(120,-1)); wx_mainX_t = new wxTextCtrl(this, ID_MAIN_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); @@ -61,9 +64,6 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wx_mainY_s->SetMinSize(wxSize(-1,120)); wx_mainY_t = new wxTextCtrl(this, ID_MAIN_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_mainY_t->SetMaxLength(3); - static_bitmap_main = new wxStaticBitmap(this, ID_MAIN_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); - static_bitmap_main->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpL), NULL, this); - static_bitmap_main->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpR), NULL, this); main_xslider_box->Add(wx_mainX_s, 0, wxALIGN_TOP); main_xslider_box->Add(wx_mainX_t, 0, wxALIGN_TOP); @@ -79,6 +79,9 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxBoxSizer* const c_yslider_box = new wxBoxSizer(wxVERTICAL); wxBoxSizer* const c_stick_box = new wxBoxSizer(wxVERTICAL); + static_bitmap_c = new wxStaticBitmap(this, ID_C_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); + static_bitmap_c->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpL), NULL, this); + static_bitmap_c->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpR), NULL, this); wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_cX_s->SetMinSize(wxSize(120,-1)); wx_cX_t = new wxTextCtrl(this, ID_C_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); @@ -87,9 +90,6 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wx_cY_s->SetMinSize(wxSize(-1,120)); wx_cY_t = new wxTextCtrl(this, ID_C_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_cY_t->SetMaxLength(3); - static_bitmap_c = new wxStaticBitmap(this, ID_C_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); - static_bitmap_c->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpL), NULL, this); - static_bitmap_c->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(TASInputDlg::OnMouseUpR), NULL, this); c_xslider_box->Add(wx_cX_s, 0, wxALIGN_TOP); c_xslider_box->Add(wx_cX_t, 0, wxALIGN_TOP); @@ -1118,4 +1118,4 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y) memDC.DrawCircle(x,y,5); memDC.SelectObject(wxNullBitmap); return bitmap; -} \ No newline at end of file +}