Prevent crash if icon was not found

Fixes CURA-A2
This commit is contained in:
Jaime van Kessel 2020-05-13 11:16:26 +02:00
parent 384f92a516
commit 580bd13a76
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -454,7 +454,10 @@ class CuraApplication(QtApplication):
super().startSplashWindowPhase()
if not self.getIsHeadLess():
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
try:
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
except FileNotFoundError:
Logger.log("w", "Unable to find the window icon.")
self.setRequiredPlugins([
# Misc.: