Browse Source

Merge pull request #22 from zao/master

Fix for issue 20, incorrect system interface refcounting in debugger
Lloyd Weehuizen 14 years ago
parent
commit
ed9a4a23e3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/Debugger/SystemInterface.cpp

+ 2 - 0
Source/Debugger/SystemInterface.cpp

@@ -36,12 +36,14 @@ SystemInterface::SystemInterface(ElementLog* _log)
 {
 {
 	log = _log;
 	log = _log;
 	application_interface = Core::GetSystemInterface();
 	application_interface = Core::GetSystemInterface();
+	application_interface->AddReference();
 	Core::SetSystemInterface(this);
 	Core::SetSystemInterface(this);
 }
 }
 
 
 SystemInterface::~SystemInterface()
 SystemInterface::~SystemInterface()
 {
 {
 	Core::SetSystemInterface(application_interface);
 	Core::SetSystemInterface(application_interface);
+	application_interface->RemoveReference();
 }
 }
 
 
 // Get the number of seconds elapsed since the start of the application.
 // Get the number of seconds elapsed since the start of the application.