Import 2017-06-07 23:51:09: master 7d1e74ac

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-12-14 14:46:36 master d2875ae4
Changeset

BUG: Fix crash due to wrong AddModel return

In vtkSlicerModelsLogic::AddModel, if the call to the storageNode
ReadData() failed, an error message was triggered and the node
removed from the scene, but AddModel() was still returning a pointer
to the modelNode, resulting in Slicer crashing.

The bug was encountered when loading a VTK Volume (DATASET set to
STRUCTURED_POINTS) and not selecting the 'Volume' description, since
the default description for the legacy VTK files is 'Model' in Slicer.

From: Alexis Girault <alexis.girault@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24815 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Loadable/Models/Logic/vtkSlicerModelsLogic.cxx Diff File