summaryrefslogtreecommitdiff
path: root/lazycachelist.py
diff options
context:
space:
mode:
Diffstat (limited to 'lazycachelist.py')
-rw-r--r--lazycachelist.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lazycachelist.py b/lazycachelist.py
index 5243def..99212ab 100644
--- a/lazycachelist.py
+++ b/lazycachelist.py
@@ -150,6 +150,8 @@ class LazyCachingTextureList():
return self.asset_count
def __getitem__(self, index):
+ if not self.asset_count:
+ raise IndexError("Index out of bounds")
i = index % self.asset_count
if abs(index) > i:
raise IndexError("Index out of bounds")