Commit 0d7b9aee authored by lassoan's avatar lassoan

BUG: Fix crash after shutdown on mac/linux

Co-authored-by: Davide Punzo's avatarDavide Punzo <punzodavide@hotmail.it>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@28014 3bd1e089-480b-0410-8dfb-8563597acbee
parent 49d82509
......@@ -265,7 +265,10 @@ class ScriptedLoadableModuleLogic():
This method can be overridden in derived classes to create a default parameter node with all
parameter values set to their default.
"""
node = slicer.vtkMRMLScriptedModuleNode()
if slicer.mrmlScene is None:
return
node = slicer.mrmlScene.CreateNodeByClass("vtkMRMLScriptedModuleNode")
if self.isSingletonParameterNode:
node.SetSingletonTag( self.moduleName )
# Add module name in an attribute to allow filtering in node selector widgets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment