Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2009, 11:12:31 AM (16 years ago)
Author:
scheusso
Message:

trying to solve a double free bug (replaced OrxonoxOverlay pointers with smart pointers)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/overlays/hud/HUDHealthBar.cc

    r5929 r6054  
    4848        this->textoverlay_ = new OverlayText(this);
    4949
    50         assert(this->textoverlay_);
     50        assert(this->textoverlay_.get());
    5151
    5252        this->textoverlay_->setCaption("");
     
    5656    {
    5757        if (this->isInitialized())
     58        {
    5859            this->textoverlay_->destroy();
     60            this->textoverlay_ = 0;
     61        }
    5962    }
    6063
     
    106109        SUPER(HUDHealthBar, changedOverlayGroup);
    107110
    108         this->getOverlayGroup()->addElement(this->textoverlay_);
     111        this->getOverlayGroup()->addElement(this->textoverlay_.get());
    109112    }
    110113
Note: See TracChangeset for help on using the changeset viewer.