Browse Source

Fix errors when trying to raise vectors to a power

rdb 9 years ago
parent
commit
5832ab8099
2 changed files with 2 additions and 1 deletions
  1. 1 0
      doc/ReleaseNotes
  2. 1 1
      dtool/src/interrogate/interfaceMakerPythonNative.cxx

+ 1 - 0
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  ------------------------
 

+ 1 - 1
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);