fix check for custom emojis

This commit is contained in:
Joshix 2021-10-15 20:13:25 +02:00
parent a42b894297
commit fb0cea6cc0

View file

@ -296,9 +296,11 @@ class TextOverlayWindow(OverlayWindow):
"""
Draw an inline image as a custom emoticon
"""
if not shape.data in self.image_list:
if shape.data >= len(self.image_list):
logging.warning(f"{shape.data} >= {len(self.image_list)}")
return
if not 'url' in self.image_list[shape.data]:
if 'url' not in self.image_list[shape.data]:
logging.warning(f"'url' not in {self.image_list[shape.data]}")
return
key = self.image_list[shape.data]['url']
if key not in self.attachment: