Changeset 15639


Ignore:
Timestamp:
07/26/13 10:29:21 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixed case when nodes is empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Nodes.cpp

    r15634 r15639  
    215215        }
    216216        else{
    217                 Node* node=dynamic_cast<Node*>(this->GetObjectByOffset(this->Size()-1));
    218                 max = node->Id();
     217                if(this->Size()==0){
     218                        max = 0;
     219                }
     220                else{
     221                        Node* node=dynamic_cast<Node*>(this->GetObjectByOffset(this->Size()-1));
     222                        max = node->Id();
     223                }
    219224        }
    220225
Note: See TracChangeset for help on using the changeset viewer.