Changeset 930 for code/branches
- Timestamp:
- Mar 27, 2008, 12:45:47 AM (17 years ago)
- Location:
- code/branches/network/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/InputHandler.cc
r929 r930 129 129 void InputHandler::destroy() 130 130 { 131 if (!this->inputSystem_) 132 { 133 this->inputSystem_->destroyInputObject(this->mouse_); 134 this->inputSystem_->destroyInputObject(this->keyboard_); 131 if (this->mouse_) 132 this->inputSystem_->destroyInputObject(mouse_); 133 if (this->keyboard_) 134 this->inputSystem_->destroyInputObject(keyboard_); 135 if (this->inputSystem_) 135 136 OIS::InputManager::destroyInputSystem(this->inputSystem_); 136 } 137 137 138 this->mouse_ = 0; 139 this->keyboard_ = 0; 140 this->inputSystem_ = 0; 138 141 this->uninitialized_ = true; 139 142 } -
code/branches/network/src/orxonox/Orxonox.cc
r929 r930 46 46 //#include <exception> 47 47 #include <deque> 48 #define _CRTDBG_MAP_ALLOC 49 #include <stdlib.h> 50 #include <crtdbg.h> 48 51 49 52 //***** ORXONOX **** … … 97 100 { 98 101 // keep in mind: the order of deletion is very important! 99 100 102 if (this->bulletMgr_) 101 103 delete this->bulletMgr_; … … 103 105 delete this->orxonoxHUD_; 104 106 Loader::close(); 105 this->inputHandler_->destroy(); 107 // do not destroy the InputHandler since this is a singleton too 108 // and might have been deleted already (after return 0; in main()) 106 109 if (this->auMan_) 107 110 delete this->auMan_;
Note: See TracChangeset
for help on using the changeset viewer.