diff options
Diffstat (limited to 'lazycachelist.py')
| -rw-r--r-- | lazycachelist.py | 2 |
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") |
