diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Debugger/VBoxDbgGui.cpp | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Debugger/VBoxDbgGui.cpp')
-rw-r--r-- | src/VBox/Debugger/VBoxDbgGui.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/VBox/Debugger/VBoxDbgGui.cpp b/src/VBox/Debugger/VBoxDbgGui.cpp index d2f7f451..9cf91bf2 100644 --- a/src/VBox/Debugger/VBoxDbgGui.cpp +++ b/src/VBox/Debugger/VBoxDbgGui.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2010 Oracle Corporation + * Copyright (C) 2006-2013 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -32,7 +32,7 @@ VBoxDbgGui::VBoxDbgGui() : m_pDbgStats(NULL), m_pDbgConsole(NULL), m_pSession(NULL), m_pConsole(NULL), - m_pMachineDebugger(NULL), m_pMachine(NULL), m_pVM(NULL), + m_pMachineDebugger(NULL), m_pMachine(NULL), m_pUVM(NULL), m_pParent(NULL), m_pMenu(NULL), m_x(0), m_y(0), m_cx(0), m_cy(0), m_xDesktop(0), m_yDesktop(0), m_cxDesktop(0), m_cyDesktop(0) { @@ -40,12 +40,12 @@ VBoxDbgGui::VBoxDbgGui() : } -int VBoxDbgGui::init(PVM pVM) +int VBoxDbgGui::init(PUVM pUVM) { /* * Set the VM handle and update the desktop size. */ - m_pVM = pVM; + m_pUVM = pUVM; /* Note! This eats the incoming reference to the handle! */ updateDesktopSize(); return VINF_SUCCESS; @@ -78,9 +78,12 @@ int VBoxDbgGui::init(ISession *pSession) hrc = m_pMachineDebugger->COMGETTER(VM)(&llVM); if (SUCCEEDED(hrc)) { - rc = init((PVM)(intptr_t)llVM); + PUVM pUVM = (PUVM)(intptr_t)llVM; + rc = init(pUVM); if (RT_SUCCESS(rc)) return rc; + + VMR3ReleaseUVM(pUVM); } /* damn, failure! */ @@ -136,7 +139,11 @@ VBoxDbgGui::~VBoxDbgGui() m_pSession = NULL; } - m_pVM = NULL; + if (m_pUVM) + { + VMR3ReleaseUVM(m_pUVM); + m_pUVM = NULL; + } } void |