Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1584 for code


Ignore:
Timestamp:
Jun 10, 2008, 3:46:17 AM (16 years ago)
Author:
landauf
Message:

some adjustments to prevent startup crash

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

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/orxonox/objects/Projectile.cc

    r1574 r1584  
    7575        SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second");
    7676
    77         this->setVelocity(this->owner_->getInitialDir() * this->speed_);
     77        if (this->owner_)
     78            this->setVelocity(this->owner_->getInitialDir() * this->speed_);
    7879    }
    7980
  • code/branches/core3/src/orxonox/objects/RotatingProjectile.cc

    r1558 r1584  
    6767        SetConfigValue(colour_, ColourValue(1.0, 0.0, 0.0));
    6868
    69         this->rotatingBillboard1_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
    70         this->rotatingBillboard2_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     69        if (this->isInitialized())
     70        {
     71            this->rotatingBillboard1_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     72            this->rotatingBillboard2_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     73        }
    7174    }
    7275
Note: See TracChangeset for help on using the changeset viewer.