From d35e775407beea82779da24e0b2d145d4cab5f29 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 9 Jul 2013 08:57:09 -0700 Subject: [PATCH] Return empty list when for ifc datatypes not encountered in file --- src/ifcwrap/IfcPython.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcwrap/IfcPython.i b/src/ifcwrap/IfcPython.i index 00fa83e631..8b6d43eb4b 100644 --- a/src/ifcwrap/IfcPython.i +++ b/src/ifcwrap/IfcPython.i @@ -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);