From 3bc3331983e2ab6e7bb4467770021586a7f18012 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 22 Jul 2013 20:06:52 -0700 Subject: [PATCH] Increase reference count when returning Py_None --- src/ifcwrap/IfcPython.i | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ifcwrap/IfcPython.i b/src/ifcwrap/IfcPython.i index f0e58dbf4d..fd7d8aabc9 100644 --- a/src/ifcwrap/IfcPython.i +++ b/src/ifcwrap/IfcPython.i @@ -54,6 +54,7 @@ const Argument& arg = *($1.second); const ArgumentType type = $1.first; if (arg.isNull()) { + Py_INCREF(Py_None); $result = Py_None; } else { switch(type) {