mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
display: Fix memory leak in GSG::get_prepared_textures()
This commit is contained in:
parent
a6580f5dd3
commit
8d22b80698
@ -25,10 +25,11 @@ static bool traverse_callback(TextureContext *tc, void *data) {
|
|||||||
PyObject *element =
|
PyObject *element =
|
||||||
DTool_CreatePyInstanceTyped(tex, Dtool_Texture,
|
DTool_CreatePyInstanceTyped(tex, Dtool_Texture,
|
||||||
true, false, tex->get_type_index());
|
true, false, tex->get_type_index());
|
||||||
tex->ref();
|
tex.cheat() = nullptr;
|
||||||
|
|
||||||
PyObject *list = (PyObject *) data;
|
PyObject *list = (PyObject *) data;
|
||||||
PyList_Append(list, element);
|
PyList_Append(list, element);
|
||||||
|
Py_DECREF(element);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user