Changeset 541bc12 in git for Singular


Ignore:
Timestamp:
Feb 15, 2012, 6:27:04 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
820046999d8c05256ea9302b64edf55a7cf83946
Parents:
ce0ca7fd9cc1f951271f6ca50500f9cf3c215178
Message:
fix: check for empty attribute list (patch from master)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/attrib.cc

    rce0ca7 r541bc12  
    138138void * atGet(leftv root,const char * name, int t)
    139139{
    140   attr a=*(root->Attribute());
    141   attr temp = a->get(name);
    142   if ((temp!=NULL) && (temp->atyp==t))
    143     return temp->data;
    144   else
    145     return NULL;
     140  attr *a=(root->Attribute());
     141  if (a!=NULL)
     142  {
     143    attr temp = (*a)->get(name);
     144    if ((temp!=NULL) && (temp->atyp==t))
     145      return temp->data;
     146  }
    146147}
    147148
Note: See TracChangeset for help on using the changeset viewer.