Is the value of result != NULL when you invoke the function? I don't see you do a new operation on result anywhere in the function.
As you stated, if it is really non-null, the program would crash because you are accessing the member functions of result in a number of places.
Reputation Points: 12
Solved Threads: 8
Junior Poster in Training
Offline 65 posts
since Jan 2009