18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 22:44:59 +01:00

fix(editor): the image of a material with no texture in its first slot is let go of too

Its normal and specular maps were read with it and stayed in the memory: the trim passed over every image with no texture of its own, the material along with it.
This commit is contained in:
maj00r
2026-11-16 02:13:09 +01:00
parent 0bbf07bf11
commit b832d2fab9

View File

@@ -125,7 +125,7 @@ void editor_mode::thumbnails_trim()
for (auto entry{browser.thumbnails.begin()}; entry != browser.thumbnails.end();)
{
auto const &thumbnail{entry->second};
if (false == browser.refresh && (thumbnail.texture == null_handle || now - thumbnail.shown < kept))
if (false == browser.refresh && ((thumbnail.texture == null_handle && thumbnail.material == null_handle) || now - thumbnail.shown < kept))
{
++entry;
continue;