Skip to content

Commit d35e775

Browse files
committed
Return empty list when for ifc datatypes not encountered in file
1 parent a5684f0 commit d35e775

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ifcwrap/IfcPython.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
%rename("Entity") IfcUntypedEntity;
4343

4444
%typemap(out) IfcEntities {
45-
const unsigned size = $1->Size();
45+
const unsigned size = $1 ? $1->Size() : 0;
4646
$result = PyList_New(size);
4747
for (unsigned i = 0; i < size; ++i) {
4848
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0);

0 commit comments

Comments
 (0)