Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 4, 2008, 8:13:58 PM (15 years ago)
Author:
rgrieder
Message:

Fixed a segfault bug than occurred when producing debug output after the Shell has been destroyed. The reason was that the Shell provides an OutputBuffer itself, so when the Shell gets destroyed, it has to set the fallback buffer again to the OutputHandler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/util/OutputHandler.cc

    r2171 r2343  
    100100        @param buffer The OutputBuffer
    101101    */
    102     void OutputHandler::setOutputBuffer(OutputBuffer& buffer)
    103     {
    104         buffer.getStream() >> this->outputBuffer_->getStream().rdbuf();
    105         this->outputBuffer_ = &buffer;
     102    void OutputHandler::setOutputBuffer(OutputBuffer* buffer)
     103    {
     104        if (buffer == NULL)
     105            this->outputBuffer_ = &this->fallbackBuffer_;
     106        else
     107        {
     108            buffer->getStream() >> this->outputBuffer_->getStream().rdbuf();
     109            this->outputBuffer_ = buffer;
     110        }
    106111    }
    107112
Note: See TracChangeset for help on using the changeset viewer.