Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7342 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Apr 19, 2006, 4:08:09 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ShellBuffer and ShellInput had the segfault-capability for years, now they have not anymore :)

Location:
trunk/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r7341 r7342  
    180180
    181181/**
    182  * sets the alignment of the 2D-element in form of a String
     182 * @brief sets the alignment of the 2D-element in form of a String
    183183 * @param alignment the alignment @see loadParams
    184184*/
     
    221221
    222222/**
    223  * sets the layer onto which this 2D-element is projected to.
     223 * @brief sets the layer onto which this 2D-element is projected to.
    224224 * @param layer the layer @see loadParams @see Element2D::charToLayer2D(const std::string& layer)
    225225 */
  • trunk/src/lib/shell/shell.cc

    r7341 r7342  
    337337  */
    338338
    339   //   lastText->setRelCoor2D(this->calculateLinePosition(0));
    340 
    341339  this->bufferText.front()->setText(text);
    342340}
     
    381379  // redisplay the buffers
    382380  list<std::string>::const_iterator it = this->bufferIterator;
     381  if (it == ShellBuffer::getInstance()->getBuffer().end())
     382  {
     383    /// FIXME
     384    PRINTF(1)("Should not heappen\n");
     385    it--;
     386  }
    383387  for (std::list<Text*>::iterator textIt = this->bufferText.begin(); textIt != this->bufferText.end(); ++textIt)
    384388  {
    385389    (*textIt)->setText((*it));
     390    if (it == ShellBuffer::getInstance()->getBuffer().begin())
     391    {
     392      /// FIXME
     393      PRINTF(1)("Should not heappen\n");
     394      break;
     395    }
    386396    it--;
    387397  }
  • trunk/src/lib/shell/shell_input.cc

    r7341 r7342  
    229229  if (!this->historyScrolling)
    230230    return;
    231   if (this->historyIT != this->history.end())
     231  if (!this->history.empty() && this->historyIT != --this->history.end())
    232232  {
    233233    std::string nextElem = *(++this->historyIT);
Note: See TracChangeset for help on using the changeset viewer.