Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 2:14:44 PM (16 years ago)
Author:
scheusso
Message:

made gamestatemanager::cleanup a bit safer ;)

Location:
code/branches/merge/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/src/network/ConnectionManager.cc

    r1278 r1282  
    342342    no->setScale(10);
    343343    no->setYawPitchRoll(orxonox::Degree(-90),orxonox::Degree(-90),orxonox::Degree(0));
    344     no->setMesh("assf3.mesh");
     344    no->setMesh("assff.mesh");
    345345    no->setMaxSpeed(500);
    346346    no->setMaxSideAndBackSpeed(50);
  • code/branches/merge/src/network/GameStateManager.cc

    r1265 r1282  
    8484      if( (*it).second <= 0 ){
    8585        COUT(4) << "GameStateManager: deleting gamestate with id: " << (*it).first << ", uses: " << (*it).second << std::endl;
    86         delete[] gameStateMap[(*it).first]->data;
    87         delete gameStateMap[(*it).first];
    88         gameStateMap.erase((*it).first);
     86        std::map<int, GameState *>::iterator tempit = gameStateMap.find((*it).first);
     87        if( tempit != gameStateMap.end() ){
     88          GameState *temp = tempit->second;
     89          if(temp){
     90            delete[] gameStateMap[(*it).first]->data;
     91            delete gameStateMap[(*it).first];
     92            gameStateMap.erase((*it).first);
     93          }
     94        }
    8995        gameStateUsed.erase(it++);
    9096        continue;
Note: See TracChangeset for help on using the changeset viewer.