Moviecache: Fix potential memory corruption.

`IMB_moviecache` is implemented as a singleton. When destructing the
singleton via `IMB_moviecache_destruct` it will not be created anymore
resulting inusage of unallocated memory and potentional memory
corruption.

When running blender this doesn't happen, but when creating images in
test cases the moviecache should be able to be recreated after it is
destroyed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D13287
This commit is contained in:
Jeroen Bakker 2021-11-22 15:52:15 +01:00 committed by Jeroen Bakker
parent be876b8db6
commit 0624235900
1 changed files with 1 additions and 0 deletions

View File

@ -268,6 +268,7 @@ void IMB_moviecache_destruct(void)
{
if (limitor) {
delete_MEM_CacheLimiter(limitor);
limitor = NULL;
}
}