From: Paul Brossier Date: Sat, 17 Sep 2016 00:31:39 +0000 (+0200) Subject: python/lib/gen_code.py: fix regression from previous commit X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b71e8b67697444d9b69ff411e5380c8fb061bfaa;p=aubio.git python/lib/gen_code.py: fix regression from previous commit --- 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):