- Timestamp:
- Oct 7, 2005, 2:28:45 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r4836 r5302 269 269 { 270 270 PRINTF(4)("setting Diffuse Map %s\n", dMap); 271 if (this->diffuseTexture )271 if (this->diffuseTexture != NULL) 272 272 ResourceManager::getInstance()->unload(this->diffuseTexture); 273 273 -
trunk/src/util/resource_manager.cc
r5219 r5302 399 399 // if pointer is existent. and only one resource of this type exists. 400 400 Resource* tmpResource = this->locateResourceByPointer(pointer); 401 if ( !tmpResource)401 if (tmpResource == NULL) 402 402 { 403 403 PRINTF(2)("Resource not Found %p\n", pointer); … … 460 460 delete[] resource->name; 461 461 this->resourceList->remove(resource); 462 delete resource; 462 463 } 463 464 else -
trunk/src/world_entities/satellite.cc
r4836 r5302 44 44 Satellite::~Satellite () 45 45 { 46 // if( collisioncluster != NULL) delete collisioncluster;47 if (this->model)48 ResourceManager::getInstance()->unload(this->model);49 46 } 50 47 -
trunk/src/world_entities/skybox.cc
r5212 r5302 103 103 delete []this->material; 104 104 delete this->model; 105 this->model = NULL; //< so that WorldEntity does not try to delete it again. 105 106 } 106 107 -
trunk/src/world_entities/weapons/weapon.cc
r5143 r5302 55 55 delete this->animation[i]; 56 56 for (int i = 0; i < WA_ACTION_COUNT; i++) 57 if (this->soundBuffers[i] )57 if (this->soundBuffers[i] != NULL && ClassList::exists(this->soundBuffers[i], CL_SOUND_BUFFER)) 58 58 ResourceManager::getInstance()->unload(this->soundBuffers[i]); 59 59 -
trunk/src/world_entities/world_entity.cc
r5300 r5302 55 55 { 56 56 // if( collisioncluster != NULL) delete collisioncluster; 57 if ( this->model)57 if (likely(this->model != NULL)) 58 58 ResourceManager::getInstance()->unload(this->model); 59 if( this->obbTree )59 if( this->obbTree != NULL) 60 60 delete this->obbTree; 61 61 }
Note: See TracChangeset
for help on using the changeset viewer.