Skip to content

Commit 405c576

Browse files
Merge pull request #769 from MaslowCNC/make-gc-not-crash-if-background-image-is-not-found
Fix crash when background image deleted
2 parents ecb4ef3 + a3ca8b5 commit 405c576

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UIElements/backgroundMenu.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def reloadBackground(self):
5858
self.close()
5959

6060
def processBackground(self):
61-
if self.data.backgroundFile == "" or os.path.isdir(
62-
self.data.backgroundFile):
61+
if self.data.backgroundFile == "" or os.path.isdir(self.data.backgroundFile) or not os.path.isfile(self.data.backgroundFile):
6362
self.data.backgroundTexture = None
6463
self.data.backgroundManualReg = []
6564
self.updateAlignmentInConfig()

0 commit comments

Comments
 (0)