[vtkusers] vtkUnstructuredGrid::InsertNextCell accessing NULL for empty ug

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Apr 30 13:30:47 EDT 2004


Tim,

For efficiency we assume that people writting their own filters check 
the allocation before using method meant to be used quite intensively.

Mathieu

Tim Tautges wrote:
> Hi all,
>   If I have an "empty" vtkUnstructuredGrid, and call InsertNextCell on 
> it, it causes the code to de-reference a NULL pointer.  I know I can 
> just call Allocate on the ug, but (IMO) the application shouldn't need 
> to check that.  It shouldn't be an efficiency concern either, as the 
> code already has to check the allocation to see if it's big enough for 
> the next cell, right?
> 
> - tim
> 






More information about the vtkusers mailing list