Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 14, 2015, 10:49:23 PM (10 years ago)
Author:
landauf
Message:

fixed crash: cs can be null (e.g. when using the 'suicide' command)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10262 r10270  
    159159    void ModularSpaceShip::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
    160160    {
    161         if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
     161        if (cs != NULL && this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
    162162            this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
    163163        else
Note: See TracChangeset for help on using the changeset viewer.