From 56b94eb8153984f2fbbe50e95ad5490ab458e26c Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 16:28:03 +0200 Subject: [PATCH] Don't raise exception in tp_traverse, instead silently passing case where object is already destructed --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index cf6434508b..1078582d53 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2237,8 +2237,7 @@ write_module_class(ostream &out, Object *obj) { out << " " << cClassName << " *local_this = NULL;\n"; out << " DTOOL_Call_ExtractThisPointerForType(self, &Dtool_" << ClassName << ", (void **) &local_this);\n"; out << " if (local_this == NULL) {\n"; - out << " PyErr_SetString(PyExc_AttributeError, \"C++ object is not yet constructed, or already destructed.\");\n"; - out << " return -1;\n"; + out << " return 0;\n"; out << " }\n\n"; // Find the remap. There should be only one.