Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6072 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Dec 12, 2005, 6:58:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: valgrind sweep

File:
1 edited

Legend:

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

    r6033 r6072  
    8686{
    8787  PRINTF(4)("Adding new Group\n");
    88   this->name = "";
     88  this->name = NULL;
    8989  this->faceMode = -1;
    9090  this->faceCount = 0;
    9191  this->next = NULL;
    9292  this->listNumber = 0;
     93  this->indices = NULL;
    9394
    9495  this->firstFace = new ModelFace;
     
    109110    glDeleteLists(this->listNumber, 1);
    110111
    111   if (this->name[0] != '\0')
     112  if (this->name != NULL)
    112113    delete[] this->name;
    113114
     
    277278void StaticModel::draw (char* groupName) const
    278279{
     280  if (groupName == NULL)
     281     return;
    279282  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    280283  ModelGroup* tmpGroup = this->firstGroup;
    281284  while (tmpGroup != NULL)
    282285    {
    283       if (!strcmp(tmpGroup->name, groupName))
     286      if (tmpGroup->name != NULL && !strcmp(tmpGroup->name, groupName))
    284287        {
    285288          PRINTF(4)("Drawing model %s\n", tmpGroup->name);
Note: See TracChangeset for help on using the changeset viewer.