mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
event: Fix memory leak getting future result in some cases
This commit is contained in:
parent
eab1308438
commit
e348d216e5
@ -99,11 +99,11 @@ static PyObject *get_done_result(const AsyncFuture *future) {
|
||||
((void *)value, Dtool_ParamValueBase, false, false, type.get_index());
|
||||
if (wrap != nullptr) {
|
||||
PyObject *value = PyObject_GetAttrString(wrap, "value");
|
||||
Py_DECREF(wrap);
|
||||
if (value != nullptr) {
|
||||
return value;
|
||||
}
|
||||
PyErr_Restore(nullptr, nullptr, nullptr);
|
||||
Py_DECREF(wrap);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user