Don't release reference if we don't have one.
Fixes a crash seen if Debugger was run on an unsupported architecture, e.g. x86-64 (for now).
This commit is contained in:
parent
74e288401d
commit
6e3918fa63
|
@ -239,6 +239,7 @@ DebuggerInterface::DebuggerInterface(team_id teamID)
|
||||||
|
|
||||||
DebuggerInterface::~DebuggerInterface()
|
DebuggerInterface::~DebuggerInterface()
|
||||||
{
|
{
|
||||||
|
if (fArchitecture != NULL)
|
||||||
fArchitecture->ReleaseReference();
|
fArchitecture->ReleaseReference();
|
||||||
|
|
||||||
Close(false);
|
Close(false);
|
||||||
|
@ -251,6 +252,9 @@ status_t
|
||||||
DebuggerInterface::Init()
|
DebuggerInterface::Init()
|
||||||
{
|
{
|
||||||
// create the architecture
|
// create the architecture
|
||||||
|
// TODO: this probably needs to be rethought a bit,
|
||||||
|
// since especially when we eventually support remote debugging,
|
||||||
|
// the architecture will depend on the target machine, not the host
|
||||||
#ifdef ARCH_x86
|
#ifdef ARCH_x86
|
||||||
fArchitecture = new(std::nothrow) ArchitectureX86(this);
|
fArchitecture = new(std::nothrow) ArchitectureX86(this);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue