mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Don't raise exception in tp_traverse, instead silently passing case where object is already destructed
This commit is contained in:
parent
d68bbae5b4
commit
56b94eb815
@ -2237,8 +2237,7 @@ write_module_class(ostream &out, Object *obj) {
|
|||||||
out << " " << cClassName << " *local_this = NULL;\n";
|
out << " " << cClassName << " *local_this = NULL;\n";
|
||||||
out << " DTOOL_Call_ExtractThisPointerForType(self, &Dtool_" << ClassName << ", (void **) &local_this);\n";
|
out << " DTOOL_Call_ExtractThisPointerForType(self, &Dtool_" << ClassName << ", (void **) &local_this);\n";
|
||||||
out << " if (local_this == NULL) {\n";
|
out << " if (local_this == NULL) {\n";
|
||||||
out << " PyErr_SetString(PyExc_AttributeError, \"C++ object is not yet constructed, or already destructed.\");\n";
|
out << " return 0;\n";
|
||||||
out << " return -1;\n";
|
|
||||||
out << " }\n\n";
|
out << " }\n\n";
|
||||||
|
|
||||||
// Find the remap. There should be only one.
|
// Find the remap. There should be only one.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user