Skip to content

Commit

Permalink
Merge pull request #769 from MaslowCNC/make-gc-not-crash-if-backgroun…
Browse files Browse the repository at this point in the history
…d-image-is-not-found

Fix crash when background image deleted
  • Loading branch information
MaslowCommunityGardenRobot authored Sep 5, 2018
2 parents ecb4ef3 + a3ca8b5 commit 405c576
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions UIElements/backgroundMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def reloadBackground(self):
self.close()

def processBackground(self):
if self.data.backgroundFile == "" or os.path.isdir(
self.data.backgroundFile):
if self.data.backgroundFile == "" or os.path.isdir(self.data.backgroundFile) or not os.path.isfile(self.data.backgroundFile):
self.data.backgroundTexture = None
self.data.backgroundManualReg = []
self.updateAlignmentInConfig()
Expand Down

0 comments on commit 405c576

Please sign in to comment.