I assume vertlist and vertexlist are actually the same variable in your real code. I think the problem is your "List *" is used before you are giving it a new list object. Initialize the list (can't remember the function) and then use it.
Make sure to free the list afterwards...
List management is a little awkward, I'm afraid. I don't remember the details right now, but I hope that helps a little.
-- Jeff
|