hrev44499 adds 1 changeset to branch 'master' old head: 74e288401db48905cf1c10a4560c4315da061bf3 new head: 6e3918fa63cf2657089ccb2eccc3820ab3e1f86e ---------------------------------------------------------------------------- 6e3918f: 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). [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44499 Commit: 6e3918fa63cf2657089ccb2eccc3820ab3e1f86e URL: http://cgit.haiku-os.org/haiku/commit/?id=6e3918f Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Wed Aug 8 23:58:40 2012 UTC ---------------------------------------------------------------------------- 1 file changed, 5 insertions(+), 1 deletion(-) .../debugger_interface/DebuggerInterface.cpp | 6 +++++- ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index ae3eb33..2504389 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -239,7 +239,8 @@ DebuggerInterface::DebuggerInterface(team_id teamID) DebuggerInterface::~DebuggerInterface() { - fArchitecture->ReleaseReference(); + if (fArchitecture != NULL) + fArchitecture->ReleaseReference(); Close(false); @@ -251,6 +252,9 @@ status_t DebuggerInterface::Init() { // 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 fArchitecture = new(std::nothrow) ArchitectureX86(this); #else