From d66ef59ecc0ca1078e2dc9629984f9d08bfee806 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 5 Jan 2022 13:54:57 +0100 Subject: [PATCH] pgraph: Fix assertion in PythonLoaderFileType with debug Python build --- doc/ReleaseNotes | 1 + panda/src/pgraph/pythonLoaderFileType.cxx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 1ddd2fd9c6..a2499ce00d 100644 --- a/doc/ReleaseNotes +++ b/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) diff --git a/panda/src/pgraph/pythonLoaderFileType.cxx b/panda/src/pgraph/pythonLoaderFileType.cxx index 3006a13cd3..cd38ed52df 100644 --- a/panda/src/pgraph/pythonLoaderFileType.cxx +++ b/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();