Add a pointer check in vtkPolyData::ShallowCopy to avoid a crash

Change-Id: I0afe81b00ac92cbcf7455a54b9f3e142f17cb6ec
Merge topic 'add-check-vtkPolyData-ShallowCopy' into master

12762865 Add a pointer check in vtkPolyData::ShallowCopy to avoid a crash