Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error was in how I passed the value to position, which is a Point2f type. In this case it was a memory leak, but in XCode it would show as a Point2f variable with empty values for x and y, not as a null value. That's what was confusing.

Always check for a valid value, in this case when a Point2f variable is initialized, it is set to Point2f(0,0) by the constructor.