It seems to me that you are correct. You point it out very nicely. I need to update the toolkit, anyway, and this would be a simple fix to check for a null pointer. Thank you very much for your help.
- Drew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Admin,
I found that some wrapped functions cannot process "null" parameter well. For example:
void vtkInteractorStyle::HighlightProp3D(vtkProp3D^ prop3D)
{
::vtkProp3D* prop3DWrap = vtk::ConvertManagedToNative<::vtkProp3D>(prop3D->GetNativePointer());
vtk::ConvertManagedToNative<::vtkInteractorStyle>(m_instance)->HighlightProp3D(prop3DWrap);
}
I you pass a null value to "prop3D", the function will be crashed just because the "GetNativePointer" should have an object owner.
But the original(unwrapped) vtkInteractorStyle::HighlightProp3D function can process NULL value quite well.
Do you think so?
Best Regards,
Lin Zhang
It seems to me that you are correct. You point it out very nicely. I need to update the toolkit, anyway, and this would be a simple fix to check for a null pointer. Thank you very much for your help.
- Drew