Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2009, 10:59:59 PM (16 years ago)
Author:
rgrieder
Message:

Fixed three memory leaks and a bug.
@beni: Is deleting the "startGame" console command a problem or did we just forget to remove the comment characters?

Location:
code/trunk/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/Main.cc

    r2896 r2927  
    6969
    7070        orxonox.run();
     71
     72        // destroy the GameStates created pre-mainly
     73        orxonox::Game::destroyStates();
    7174    } // orxonox gets destroyed right here!
    7275
  • code/trunk/src/orxonox/gamestates/GSMainMenu.cc

    r2896 r2927  
    8686        InputManager::getInstance().requestDestroyState("mainMenu");
    8787
    88 /*
     88        GUIManager::getInstance().setCamera(0);
     89        GraphicsManager::getInstance().setCamera(0);
     90        this->scene_->getSceneManager()->destroyCamera(this->camera_);
     91        delete this->scene_;
     92
    8993        if (this->ccStartGame_)
    9094        {
     
    9296            this->ccStartGame_ = 0;
    9397        }
    94 */
    9598    }
    9699
  • code/trunk/src/orxonox/gui/GUIManager.cc

    r2896 r2927  
    252252    void GUIManager::setCamera(Ogre::Camera* camera)
    253253    {
    254         this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
     254        if (camera == NULL)
     255            this->guiRenderer_->setTargetSceneManager(0);
     256        else
     257            this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
    255258    }
    256259
Note: See TracChangeset for help on using the changeset viewer.