mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -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 =
|
||||
DTool_CreatePyInstanceTyped(tex, Dtool_Texture,
|
||||
true, false, tex->get_type_index());
|
||||
tex->ref();
|
||||
tex.cheat() = nullptr;
|
||||
|
||||
PyObject *list = (PyObject *) data;
|
||||
PyList_Append(list, element);
|
||||
Py_DECREF(element);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user