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 9, 2016
1 parent 64825b9 commit 2d8e1d385eba269afddf131e906236fac71afdd5
Showing with 3 additions and 0 deletions.
  1. +3 −0 python/plugins/processing/gui/ScriptEditorDialog.py
@@ -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.
You can’t perform that action at this time.