Skip to content
Permalink
Browse files

Add fallback to parameter's name to be safe

  • Loading branch information
nyalldawson committed Oct 23, 2018
1 parent e5f52f9 commit b2a2a2603c4dafd6cb47a5fee20c9ae76f07314a
Showing with 3 additions and 0 deletions.
  1. +3 −0 python/plugins/processing/gui/Postprocessing.py
@@ -60,6 +60,9 @@ def set_layer_name(layer, context_layer_details):
path = source_parts.get('path', '')
if path:
layer.setName(os.path.splitext(os.path.basename(path))[0])
elif context_layer_details.name:
# fallback to parameter's name -- shouldn't happen!
layer.setName(context_layer_details.name)
else:
layer.setName(context_layer_details.name)

0 comments on commit b2a2a26

Please sign in to comment.
You can’t perform that action at this time.