Skip to content

Commit

Permalink
[processing] Fix potential crash when calling processing.run with
Browse files Browse the repository at this point in the history
custom context, but no feedback object

(cherry-picked from 977e14b)
  • Loading branch information
nyalldawson committed Jun 28, 2018
1 parent 15ab4c1 commit 543df81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/core/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
if context is None:
context = dataobjects.createContext(feedback)

if context.feedback() is None:
context.setFeedback(feedback)

ok, msg = alg.checkParameterValues(parameters, context)
if not ok:
msg = Processing.tr('Unable to execute algorithm\n{0}').format(msg)
Expand Down

0 comments on commit 543df81

Please sign in to comment.