Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_particleinfo.cpp

    r24a5e0 ra3696f  
    1313ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {};
    1414
    15 ParticleInfo::ParticleInfo(ParticleInfo *pointer) :
    16     nr(pointer->nr),
    17     Name(pointer->Name)
    18     {}
    19 
    20 
    2115/** Destructor of ParticleInfo.
    2216 */
     
    2822ostream & operator << (ostream &ost, const ParticleInfo &a)
    2923{
    30   ost << "[" << a.Name << "|" << &a << "]";
     24  if (a.Name == NULL)
     25    ost << "[NULL]";
     26  else
     27    ost << "[" << a.Name << "|" << &a << "]";
    3128  return ost;
    3229};
     
    3431ostream & ParticleInfo::operator << (ostream &ost) const
    3532{
    36   ost << "[" << Name << "|" << this << "]";
     33  if (Name == NULL)
     34    ost << "[NULL]";
     35  else
     36    ost << "[" << Name << "|" << this << "]";
    3737  return ost;
    3838};
Note: See TracChangeset for help on using the changeset viewer.