[Shapelib] Re: Shapelib Digest, Vol 46, Issue 3

Tom Kazimiers 2voodoo at gmx.de
Mon Feb 18 14:59:40 PST 2008


Joaquin,

currently I was only able to make a quick test with your code.
Some suggestions:
1. You should either malloc some space for the pointer "panParts" and 
then assign some value (panParts[0] = 1;) or set it null. In general you 
should initialize variables.
2. I could not find the source for the null pointer exception - I had 
just no time - but if you use CreateSimpleObject it works:
psObject = SHPCreateSimpleObject(nShapeType, vertexcount, X, Y, NULL);

If I got some time I will try to find the problem with CreateObject.

bye,
Tom




More information about the Shapelib mailing list