aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpython.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r--src/pl/plpython/plpython.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index ea47067a855..1d5687fba47 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -2042,7 +2042,10 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
elm->typlen, elm->typbyval, elm->typalign,
&isnull);
if (isnull)
+ {
+ Py_INCREF(Py_None);
PyList_SET_ITEM(list, i, Py_None);
+ }
else
PyList_SET_ITEM(list, i, elm->func(elm, elem));
}