From 34b737249f5433ffb80c2480dbf9f8aed9b57d44 Mon Sep 17 00:00:00 2001 From: clayote Date: Mon, 9 Dec 2024 04:08:29 +1300 Subject: [PATCH] Fix a crash when loading a lot of images at once (#8939) --- kivy/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/cache.py b/kivy/cache.py index 48d9cd0166..18c71c2afe 100644 --- a/kivy/cache.py +++ b/kivy/cache.py @@ -193,7 +193,7 @@ def _purge_oldest(category, maxpurge=1): import heapq time = Clock.get_time() heap_list = [] - for key in Cache._objects[category]: + for key in list(Cache._objects[category]): obj = Cache._objects[category][key] if obj['lastaccess'] == obj['timestamp'] == time: continue