From 5832ab8099f8880e8b8ca6404d5233c9e6187179 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 31 Oct 2016 22:10:47 +0100 Subject: [PATCH] Fix errors when trying to raise vectors to a power --- doc/ReleaseNotes | 1 + dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 76c7add700..157a20b2bf 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -46,6 +46,7 @@ This issue fixes several bugs that were still found in 1.9.2. * Add keyword argument support to make() methods such as Shader.make() * Fix compilation errors with Bullet 2.84 * Fix exception when trying to pickle NodePathCollection objects +* Fix error when trying to raise vectors to a power ------------------------ RELEASE 1.9.2 ------------------------ diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index db1825c079..014c98f438 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2209,7 +2209,7 @@ write_module_class(ostream &out, Object *obj) { string expected_params; - out << " if (arg2 != (PyObject *)NULL) {\n"; + out << " if (arg2 != (PyObject *)NULL && arg2 != Py_None) {\n"; out << " PyObject *args = PyTuple_Pack(2, arg, arg2);\n"; write_function_forset(out, two_param_remaps, 2, 2, expected_params, 4, true, true, AT_varargs, RF_pyobject | RF_err_null | RF_decref_args, true);