Changeset 6072 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Dec 12, 2005, 6:58:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/static_model.cc
r6033 r6072 86 86 { 87 87 PRINTF(4)("Adding new Group\n"); 88 this->name = "";88 this->name = NULL; 89 89 this->faceMode = -1; 90 90 this->faceCount = 0; 91 91 this->next = NULL; 92 92 this->listNumber = 0; 93 this->indices = NULL; 93 94 94 95 this->firstFace = new ModelFace; … … 109 110 glDeleteLists(this->listNumber, 1); 110 111 111 if (this->name [0] != '\0')112 if (this->name != NULL) 112 113 delete[] this->name; 113 114 … … 277 278 void StaticModel::draw (char* groupName) const 278 279 { 280 if (groupName == NULL) 281 return; 279 282 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 280 283 ModelGroup* tmpGroup = this->firstGroup; 281 284 while (tmpGroup != NULL) 282 285 { 283 if ( !strcmp(tmpGroup->name, groupName))286 if (tmpGroup->name != NULL && !strcmp(tmpGroup->name, groupName)) 284 287 { 285 288 PRINTF(4)("Drawing model %s\n", tmpGroup->name);
Note: See TracChangeset
for help on using the changeset viewer.