Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 631


Ignore:
Timestamp:
Dec 19, 2007, 12:25:13 AM (16 years ago)
Author:
scheusso
Message:

removed segfault

Location:
code/branches/FICN/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/Model.cc

    r630 r631  
    1515    {
    1616        RegisterObject(Model);
    17         registerAllVariables();
    1817    }
    1918
     
    3029            meshSrc_ = xmlElem->Attribute("mesh");
    3130        }
     31        create();
    3232    }
    3333   
    3434    bool Model::create(){
    35       this->mesh_.setMesh(meshSrc_);
    36       this->attachObject(this->mesh_.getEntity());
    37 
    38       COUT(4) << "Loader: Created model" << std::endl;
     35      if(meshSrc_.compare("")!=0){
     36        this->mesh_.setMesh(meshSrc_);
     37        this->attachObject(this->mesh_.getEntity());
     38        COUT(4) << "Loader: Created model" << std::endl;
     39      }
     40      registerAllVariables();
    3941      return true;
    4042    }
  • code/branches/FICN/src/orxonox/objects/WorldEntity.cc

    r630 r631  
    4646        RegisterObject(WorldEntity);
    4747
    48         registerAllVariables();
    4948        if (Orxonox::getSingleton()->getSceneManager())
    5049        {
     
    157156
    158157    bool WorldEntity::create(){
     158      registerAllVariables();
    159159      return true;
    160160    }
Note: See TracChangeset for help on using the changeset viewer.