Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

removed segfault

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.