Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Sep 21, 2005, 8:07:51 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: some little errors corrected via Valgrind

Location:
trunk/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/texture.cc

    r5211 r5212  
    3232Texture::Texture(const char* imageName)
    3333{
    34   bAlpha = false;
     34  this->bAlpha = false;
    3535  this->texture = 0;
    3636  if (imageName)
  • trunk/src/lib/graphics/light.cc

    r5211 r5212  
    242242
    243243  for (int i = 0; i < NUMBEROFLIGHTS; i++)
    244     if (this->lights[i])
     244    if (this->lights[i] != NULL)
    245245      delete lights[i];
    246246  delete[] lights;
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5211 r5212  
    467467void Element2D::removeChild2D (Element2D* child)
    468468{
    469   child->remove2D();
    470   this->children->remove(child);
    471   child->parent = NULL;
     469  if (child != NULL)
     470  {
     471    child->remove2D();
     472    this->children->remove(child);
     473    child->parent = NULL;
     474  }
    472475}
    473476
  • trunk/src/lib/shell/shell_buffer.cc

    r5210 r5212  
    157157
    158158   // adding all the new Lines
    159   while (newLineBegin < inputEnd)
     159  while (newLineBegin < inputEnd )
    160160  {
    161161    newLineEnd = strchr(newLineBegin, '\n');
     
    165165    {
    166166//       newLineEnd = newLineBegin + strlen(newLineBegin);
    167       strcpy(this->keepBufferArray, newLineBegin);
     167      strcat(this->keepBufferArray, newLineBegin);
    168168      this->keepBuffer = true;
    169169      break;
Note: See TracChangeset for help on using the changeset viewer.