[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:53:11 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit 7b39b428886220f88a8d8bfd285635bd324a8d90
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date: Wed Feb 15 18:24:11 2012 +0100
fix: check for empty attribute list
diff --git a/Singular/attrib.cc b/Singular/attrib.cc
index ff3739b..a64f47f 100644
--- a/Singular/attrib.cc
+++ b/Singular/attrib.cc
@@ -137,12 +137,14 @@ void * atGet(idhdl root,const char * name, int t)
void * atGet(leftv root,const char * name, int t)
{
- attr a=*(root->Attribute());
- attr temp = a->get(name);
- if ((temp!=NULL) && (temp->atyp==t))
- return temp->data;
- else
- return NULL;
+ attr *a=(root->Attribute());
+ if (a!=NULL)
+ {
+ attr temp = (*a)->get(name);
+ if ((temp!=NULL) && (temp->atyp==t))
+ return temp->data;
+ }
+ return NULL;
}
void atSet(idhdl root,const char * name,void * data,int typ)
--
an open source computer algebra system
More information about the debian-science-commits
mailing list