Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 13, 2010, 10:39:54 PM (14 years ago)
Author:
dafrick
Message:

Resolved bug, that caused orxonox to crash whenever a level with pickups was loaded twice in one session.
Also some more debug/info output, commenting and cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/PickupRepresentation.cc

    r6711 r6725  
    4949        This is primarily for use of the PickupManager in creating a default PickupRepresentation.
    5050    */
    51     PickupRepresentation::PickupRepresentation() : BaseObject(NULL), spawnerRepresentation_(NULL)
     51    PickupRepresentation::PickupRepresentation() : BaseObject(NULL), spawnerRepresentation_(NULL), pickup_(NULL)
    5252    {
    5353        RegisterObject(PickupRepresentation);
     
    6060        Default Constructor. Registers the object and initializes its member variables.
    6161    */
    62     PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), spawnerRepresentation_(NULL)
     62    PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), spawnerRepresentation_(NULL), pickup_(NULL)
    6363    {
    6464        RegisterObject(PickupRepresentation);
     
    7575        if(this->spawnerRepresentation_ != NULL)
    7676            this->spawnerRepresentation_->destroy();
     77       
     78        if(this->pickup_ != NULL)
     79            PickupManager::getInstance().unregisterRepresentation(this->pickup_->getPickupIdentifier(), this);
    7780    }
    7881   
     
    8790        this->spawnerTemplate_ = "";
    8891        this->inventoryRepresentation_ = "Default";
    89         this->pickup_ = NULL;
    9092    }
    9193   
Note: See TracChangeset for help on using the changeset viewer.