Fix a segmentation fault when the wiimote source is changed to a real wiimote in the config dialog.

A little clean up of the debugger code.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7237 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-25 03:56:14 +00:00
parent 18b85b9cd5
commit 1f33fc1a48
6 changed files with 8 additions and 32 deletions

View File

@ -38,13 +38,7 @@
#include "StringUtil.h"
#include "LogManager.h"
// ugly that this lib included code from the main
#include "../../DolphinWX/Src/Globals.h"
// TODO: Fix this ugly hack
namespace {
CJitWindow *the_jit_window;
}
#include "../Globals.h"
enum
{
@ -67,7 +61,6 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, pos, size, style, name)
{
the_jit_window = this;
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* sizerSplit = new wxBoxSizer(wxHORIZONTAL);
sizerSplit->Add(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, _T("(ppc)"),
@ -97,16 +90,9 @@ void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) {
void CJitWindow::ViewAddr(u32 em_address)
{
if (the_jit_window)
{
the_jit_window->Show(true);
the_jit_window->Compare(em_address);
the_jit_window->SetFocus();
}
else
{
PanicAlert("Jit window not available");
}
Show(true);
Compare(em_address);
SetFocus();
}
void CJitWindow::Compare(u32 em_address)