Return empty list when for ifc datatypes not encountered in file

This commit is contained in:
Thomas Krijnen
2013-07-09 08:57:09 -07:00
parent a5684f0996
commit d35e775407
+1 -1
View File
@@ -42,7 +42,7 @@
%rename("Entity") IfcUntypedEntity;
%typemap(out) IfcEntities {
const unsigned size = $1->Size();
const unsigned size = $1 ? $1->Size() : 0;
$result = PyList_New(size);
for (unsigned i = 0; i < size; ++i) {
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0);