- Catch missing image sooner

This commit is contained in:
trigg 2022-04-09 11:03:16 +00:00
parent 48a99eb33b
commit 746a621dad

View file

@ -113,10 +113,11 @@ class SurfaceGetter():
log.error("Unknown image type: %s", mixpath)
except FileNotFoundError:
log.error("File not found: %s", mixpath)
surface = from_pil(image)
if surface:
self.func(self.identifier, surface)
return
if image:
surface = from_pil(image)
if surface:
self.func(self.identifier, surface)
return
def from_pil(image, alpha=1.0):