Changeset 4412


Ignore:
Timestamp:
07/06/10 11:49:28 (15 years ago)
Author:
Mathieu Morlighem
Message:

fixed SpawnTria

Location:
issm/trunk/src/c/objects/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/PentaHook.cpp

    r4410 r4412  
    3636
    3737        for(i=0;i<this->numanalyses;i++){
    38                 delete this->hnodes[i];
     38                if (this->hnodes[i]) delete this->hnodes[i];
    3939        }
    4040        delete [] this->hnodes;
     
    8383        for(i=0;i<this->numanalyses;i++){
    8484                /*Do not do anything if Hook is empty*/
    85                 if (this->hnodes[i]->GetNum()==0) continue;
    86                 /*Else, spawn Hook*/
    87                 triahook->hnodes[i]=this->hnodes[i]->Spawn(indices,3);
     85                if (!this->hnodes[i] || this->hnodes[i]->GetNum()==0){
     86                        triahook->hnodes[i]=NULL;
     87                }
     88                else{
     89                        /*Else, spawn Hook*/
     90                        triahook->hnodes[i]=this->hnodes[i]->Spawn(indices,3);
     91                }
    8892        }
    8993        triahook->hmatice=(Hook*)this->hmatice->copy();
  • issm/trunk/src/c/objects/Elements/TriaHook.cpp

    r4410 r4412  
    3434
    3535        for(i=0;i<this->numanalyses;i++){
    36                 delete this->hnodes[i];
     36                if (this->hnodes[i]) delete this->hnodes[i];
    3737        }
    3838        delete [] this->hnodes;
Note: See TracChangeset for help on using the changeset viewer.