Changeset 541bc12 in git


Ignore:
Timestamp:
Feb 15, 2012, 6:27:04 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
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.