Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
3 changes: 3 additions & 0 deletions python/plugins/processing/gui/ScriptEditorDialog.py
Expand Up @@ -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()
Expand Down

0 comments on commit 2d8e1d3

Please sign in to comment.