PyAPI: disable assertion when building Blender as a Python module
When adding the assert I thought this wasn't happening on Linux (since I'm unable to redo it locally). However the builtbot hits this assert on Linux, causing tests to fail. Resolves #135195
This commit is contained in:
@@ -9668,15 +9668,15 @@ static void bpy_class_free(void *pyob_ptr)
|
||||
{
|
||||
#ifdef WITH_PYTHON_MODULE
|
||||
/* This can happen when Python has exited before all Blender's RNA types have been freed.
|
||||
* In this Python memory management can't run. see: #125376.
|
||||
* In this Python memory management can't run.
|
||||
*
|
||||
* NOTE(@ideasman42): While I wasn't able to redo locally, it resolves the problem.
|
||||
* Apparently this happens with AUDASPACE on macOS. Ideally this would be resolved
|
||||
* This happens:
|
||||
* - With AUDASPACE on macOS, see: #125376.
|
||||
* - With the build-bot on Linux, see: #135195.
|
||||
* Ideally this would be resolved
|
||||
* by correcting the order classes are freed (before Python exits). */
|
||||
if (!Py_IsInitialized()) {
|
||||
# if !(defined(__APPLE__) || defined(_WIN32))
|
||||
BLI_assert_msg(false, "This should never happen, please report a bug!");
|
||||
# endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user