[ui] fix -> icons that cannot be rendered are being displayed as an empty space

This commit is contained in:
Vinicius Moreira
2020-08-21 16:19:27 -03:00
parent 634f3dc932
commit 5b85c3716f
2 changed files with 6 additions and 1 deletions

View File

@@ -426,7 +426,11 @@ class AppsTable(QTableWidget):
else:
try:
icon = QIcon.fromTheme(icon_path)
self.icon_cache.add_non_existing(pkg.model.icon_url, {'icon': icon, 'bytes': None})
if icon.isNull():
icon = QIcon(pkg.model.get_default_icon_path())
else:
self.icon_cache.add_non_existing(pkg.model.icon_url, {'icon': icon, 'bytes': None})
except:
icon = QIcon(pkg.model.get_default_icon_path())