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.

Location:
code/branches/presentation/src/modules/objects/triggers
Files:
2 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               
  • code/branches/presentation/src/modules/objects/triggers/MultiTriggerContainer.cc

    r7601 r8667  
    7373        {
    7474            this->setForPlayer(true);
    75             this->setTriggeringPlayer(pawn);
     75            this->setTriggeringPawn(pawn);
    7676        }
    7777    }
Note: See TracChangeset for help on using the changeset viewer.