diff --git a/src/hamster/lib/graphics.py b/src/hamster/lib/graphics.py index af4ceb750..a44ee73cf 100644 --- a/src/hamster/lib/graphics.py +++ b/src/hamster/lib/graphics.py @@ -1440,9 +1440,13 @@ def __init__(self, name, size=24, **kwargs): def __setattr__(self, name, val): BitmapSprite.__setattr__(self, name, val) - if name in ('name', 'size'): # no other reason to discard cache than just on path change + if name in ('name', 'size'): # no other reason to discard cache than just on path change if self.__dict__.get('name') and self.__dict__.get('size'): - self.image_data = self.theme.load_icon(self.name, self.size, 0) + try: + self.image_data = self.theme.load_icon(self.name, self.size, 0) + except: + # Missing / broken icon should not crash the app + self.image_data = None else: self.image_data = None