[vtk-developers] vtkMINCImageAttributes regression in master vs 6.3, related to new vtkDataArray changes?
Sean McBride
sean at rogue-research.com
Thu Apr 21 14:34:29 EDT 2016
On Thu, 21 Apr 2016 13:18:05 -0400, David Lonie said:
>I think the proper fix here is to always either check that the array is not
>empty before calling GetPointer or explicitly checking the return value.
OK, so I think two changes are in order:
1) I improve my own code to defend against getting null back.
2) I change vtkMINCImageAttributes::ConvertDataArrayToString to return "" instead of null when GetPointer gives back null, thus restoring old behaviour. It seems the class' own internal usage doesn't expect null either, ex:
os << this->ConvertDataArrayToString(array) << " ;\n";
(I confirmed that ostream's operator<< crashes if given null.)
Will make a patch...
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list