Skip to content
Permalink
Browse files
[processing] don't crash if user canceled script loading
(cherry picked from commit 583eaef)
  • Loading branch information
alexbruy committed May 12, 2016
1 parent 64825b9 commit 2d8e1d3
Showing 1 changed file with 3 additions and 0 deletions.
@@ -202,6 +202,9 @@ def openScript(self):
self.filename = QFileDialog.getOpenFileName(
self, self.tr('Save script'), scriptDir, filterName)

if self.filename == '':
return

QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
with codecs.open(self.filename, 'r', encoding='utf-8') as f:
txt = f.read()

0 comments on commit 2d8e1d3

Please sign in to comment.