From b71e8b67697444d9b69ff411e5380c8fb061bfaa Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 17 Sep 2016 02:31:39 +0200 Subject: [PATCH] python/lib/gen_code.py: fix regression from previous commit --- python/lib/gen_code.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/lib/gen_code.py b/python/lib/gen_code.py index c34f438a..73826c1f 100644 --- a/python/lib/gen_code.py +++ b/python/lib/gen_code.py @@ -289,6 +289,9 @@ Py_{shortname}_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds) name = p['name'] return """ self->{name} = {defval}; + if ({name} != NULL) {{ + self->{name} = {name}; + }} """.format(defval = aubiodefvalue[name], name = name) def check_valid_smpl(self, p): -- 2.11.0