瀏覽代碼

pgraph: Fix assertion in PythonLoaderFileType with debug Python build

rdb 4 年之前
父節點
當前提交
29324d4e74
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 1 0
      doc/ReleaseNotes
  2. 4 0
      panda/src/pgraph/pythonLoaderFileType.cxx

+ 1 - 0
doc/ReleaseNotes

@@ -48,6 +48,7 @@ Miscellaneous
 * FilterManager mul parameter now accepts floating-point values (#1231)
 * Assorted minor API documentation improvements
 * Fix memory leak getting Bullet persistent manifolds from Python (#1193)
+* Fix assertion in PythonLoaderFileType with debug Python build
 * Add missing property interface to PlaneNode
 * Fix prepare_scene() not properly invoking the Shader Generator
 * Add name property to AICharacter class (#1205)

+ 4 - 0
panda/src/pgraph/pythonLoaderFileType.cxx

@@ -172,8 +172,12 @@ init(PyObject *loader) {
     }
     Py_DECREF(supports_compressed);
   }
+  else {
+    PyErr_Clear();
+  }
 
   _load_func = PyObject_GetAttrString(loader, "load_file");
+  PyErr_Clear();
   _save_func = PyObject_GetAttrString(loader, "save_file");
   PyErr_Clear();