Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2011, 6:44:45 PM (13 years ago)
Author:
dafrick
Message:

Possible fix for segfaults due to player being NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.cc

    r8637 r8667  
    205205                        entity = entity->getParent();
    206206
    207                     Pawn* player = orxonox_cast<Pawn*>(entity);
    208                     this->setTriggeringPlayer(player);
     207                    Pawn* pawn = orxonox_cast<Pawn*>(entity);
     208                    if(pawn != NULL)
     209                        this->setTriggeringPawn(pawn);
     210                    else
     211                        CCOUT(2) << "Pawn was NULL." << endl;
    209212                }
    210213               
Note: See TracChangeset for help on using the changeset viewer.